Home
last modified time | relevance | path

Searched hist:"6 d5574ed" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/sound/soc/
H A Dsoc-topology.c6d5574ed Thu Sep 14 15:44:12 CDT 2017 Christophe JAILLET <christophe.jaillet@wanadoo.fr> ASoC: topology: Fix a potential NULL pointer dereference in 'soc_tplg_dapm_widget_denum_create()'

if 'se = kzalloc()' fails in the 'for' loop, we will branch to 'err'.
But in this case, 'kc[i].private_value' will still be NULL. A NULL pointer
dereference will then occur is the error handling path.

In such a case, it is safe to just 'continue' in order to skip this entry
and free the other ones.

Fixes: 1a7dd6e2f192 ("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>