1
0
Fork 0

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>
hifive-unleashed-5.1
Bard liao 2019-01-25 14:06:45 -06:00 committed by Mark Brown
parent 34db6a3e91
commit 7620fe9161
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 3 additions and 0 deletions

View File

@ -1583,6 +1583,9 @@ widget:
if (ret < 0)
goto ready_err;
kfree(template.sname);
kfree(template.name);
return 0;
ready_err: