]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: topology: Fix memleak in soc_tplg_manifest_load()
authorDragos Tarcatu <dragos_tarcatu@mentor.com>
Fri, 7 Feb 2020 18:53:25 +0000 (20:53 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 19 Feb 2020 19:48:43 +0000 (19:48 +0000)
commit2e8d4f685beb69685996c880dd5e38370279cfc8
treeae1d98d97e964310b71819d254d5dd0ce5a72a00
parent760c266bc70f3a3387d0d9a96bf20eb8bc463241
ASoC: topology: Fix memleak in soc_tplg_manifest_load()

In case of ABI version mismatch, _manifest needs to be freed as
it is just a copy of the original topology manifest. However, if
a driver manifest handler is defined, that would get executed and
the cleanup is never reached. Fix that by getting the return status
of manifest() instead of returning directly.

Fixes: d6f033e23584 ("ASoC: topology: Make manifest backward compatible from ABI v4")
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Link: https://lore.kernel.org/r/20200207185325.22320-3-dragos_tarcatu@mentor.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c