mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-25 08:26:03 -05:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user