]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: topology: Fix a potential memory leak in 'soc_tplg_dapm_widget_denum_create()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 14 Sep 2017 20:44:24 +0000 (22:44 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 14 Sep 2017 21:13:03 +0000 (14:13 -0700)
commit80c7db2c8c34d02b524f69f16b791f23e09e0ad3
treeae96a0f7df22415824b9f5de9cd8db403594c890
parentd5746c4f930c027ca78a704a65fecc9a98a644d1
ASoC: topology: Fix a potential memory leak in 'soc_tplg_dapm_widget_denum_create()'

If this sanity check fails, we must free the memory that has already been
allocated.

So we must go to 'err' as in the other error handling parth of this
function.

Fixes: 89c807dc6297 ("ASoC: topology: Allow a widget to have multiple enum controls")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c