forked from Minki/linux
ASoC: topology: fix memory leak in soc_tplg_dapm_widget_create
template.sname and template.name are only freed when an error occur. They should be freed in the success return case, too. Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
34db6a3e91
commit
7620fe9161
@ -1583,6 +1583,9 @@ widget:
|
||||
if (ret < 0)
|
||||
goto ready_err;
|
||||
|
||||
kfree(template.sname);
|
||||
kfree(template.name);
|
||||
|
||||
return 0;
|
||||
|
||||
ready_err:
|
||||
|
Loading…
Reference in New Issue
Block a user