]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: topology: Use the correct dobj to free enum control values and texts
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Fri, 5 Apr 2019 02:48:33 +0000 (19:48 -0700)
committerMark Brown <broonie@kernel.org>
Mon, 8 Apr 2019 06:37:35 +0000 (13:37 +0700)
commite594232a0081c09049bcac8cbcb5c93bddc79cb9
treeec913bc751c3d97d4400c0114de4bdcabf4808d0
parentac75235370f28109e85128b771d85fe24cb48448
ASoC: topology: Use the correct dobj to free enum control values and texts

The control values and texts of the enum kcontrol associated
with a widget need to be freed when the widget is removed.
However, both struct snd_soc_dapm_widget and struct soc_enum
contain a dobj member, which resulted in a confusion.
The existing code generates a null pointer dereference by
attempting to free the values and texts from the dobj which
belongs to the widget instead of the dobj belonging to the
enum kcontrol.

The suggested fix is to use the correct dobj member (se->dobj)
of the enum kcontrol.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c