]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 06:18:39 +0000 (07:18 +0100)
commit816574df011884f8c7b14eccb6f9238edfce94b6
tree451aaa4b49f6ecc1307c056d47a9e821415e3e2c
parentdc4d8133d292557dca462feda9828ca0f8bcefed
ASoC: topology: Fix memleak in soc_tplg_link_elems_load()

commit 2b2d5c4db732c027a14987cfccf767dac1b45170 upstream.

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: 593d9e52f9bb ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/soc-topology.c