aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-topology.c
diff options
context:
space:
mode:
authorBard liao <yung-chuan.liao@linux.intel.com>2019-03-05 23:57:53 +0800
committerMark Brown <broonie@kernel.org>2019-03-19 11:56:40 +0000
commitb3718b8f7e9b4afdfd281d35233b078585aef2e9 (patch)
treec169b7adbb628e4975d617a062b1bbc6975cc63b /sound/soc/soc-topology.c
parentASoC: topology: free stream_name of dai_drv (diff)
downloadlinux-dev-b3718b8f7e9b4afdfd281d35233b078585aef2e9.tar.xz
linux-dev-b3718b8f7e9b4afdfd281d35233b078585aef2e9.zip
ASoC: topology: free link string in error
Some strings are allocated by kstrdup, but not freed when error happened. Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r--sound/soc/soc-topology.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 1be60cea2bf5..c6a30d000f59 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1883,6 +1883,9 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
ret = soc_tplg_dai_link_load(tplg, link, NULL);
if (ret < 0) {
dev_err(tplg->comp->dev, "ASoC: FE link loading failed\n");
+ kfree(link->name);
+ kfree(link->stream_name);
+ kfree(link->cpu_dai_name);
kfree(link);
return ret;
}