]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: topology: Fix memleak in soc_tplg_link_elems_load()
authorDragos Tarcatu <dragos_tarcatu@mentor.com>
Fri, 7 Feb 2020 18:53:24 +0000 (20:53 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 19 Feb 2020 19:48:42 +0000 (19:48 +0000)
commit760c266bc70f3a3387d0d9a96bf20eb8bc463241
treefe7c2c1b455ba541c3c811b5861a8a191508a0ad
parent98fec7c9e5c67a4d95968a1a4a2a0ab1ad95b179
ASoC: topology: Fix memleak in soc_tplg_link_elems_load()

If soc_tplg_link_config() fails, _link needs to be freed in case of
topology ABI version mismatch. However the current code is returning
directly and ends up leaking memory in this case.
This patch fixes that.

Fixes: 1d0afd5fad43 ("ASoC: topology: Add support to configure existing physical DAI links")
Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Link: https://lore.kernel.org/r/20200207185325.22320-2-dragos_tarcatu@mentor.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c