diff options
author | Bard liao <yung-chuan.liao@linux.intel.com> | 2019-01-25 23:06:45 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-01-29 21:03:32 +0300 |
commit | 7620fe9161cec2722db880affe03f5e9e2bb93d5 (patch) | |
tree | f33eaaa27c959e02dd9c993a117d3acd3a8f2fcc /sound/soc | |
parent | 34db6a3e91d8f6f6fefbbd9ad7e1efc6f8d440e0 (diff) | |
download | linux-7620fe9161cec2722db880affe03f5e9e2bb93d5.tar.xz |
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>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/soc-topology.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 71bc5b8a9bd3..2cb0a05e2368 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1583,6 +1583,9 @@ widget: if (ret < 0) goto ready_err; + kfree(template.sname); + kfree(template.name); + return 0; ready_err: |