]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: qdsp6: fix a use after free bug in open()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 17 Dec 2021 15:00:07 +0000 (18:00 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 21 Dec 2021 18:05:40 +0000 (18:05 +0000)
commitc4afe066de1b358247ed981184ef986e4fe20258
tree256201d9a93e8927b1f4d82435eba71f2ce32061
parentcee80a390739fa5d36729047128b6e0386b0a256
ASoC: qdsp6: fix a use after free bug in open()

This code frees "graph" and then dereferences to save the error code.
Save the error code first and then use gotos to unwind the allocation.

Fixes: 804180cd40cc ("ASoC: qdsp6: Fix an IS_ERR() vs NULL bug")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211217150007.GB16611@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/q6apm.c