未验证 提交 b3718b8f 编写于 作者: B Bard liao 提交者: Mark Brown

ASoC: topology: free link string in error

Some strings are allocated by kstrdup, but not freed when error
happened.
Signed-off-by: NBard liao <yung-chuan.liao@linux.intel.com>
Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 7b6f68a4
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册