ASoC: SOF: ipc3-topology: Set scontrol->priv to NULL after freeing it
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 31 Mar 2022 11:47:57 +0000 (14:47 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 5 Apr 2022 09:23:20 +0000 (10:23 +0100)
commita403993ce98fb401f696da7c4f374739a7609cff
treedb21b6cfafcd9d154988cc8e8080cf27c3a6574e
parent4a4043456cb82df20e146902cfb3dd84bc393cd3
ASoC: SOF: ipc3-topology: Set scontrol->priv to NULL after freeing it

Since the scontrol->priv is freed up during load operation it should be set
to NULL to be safe against double freeing attempt.

Fixes: b5cee8feb1d48 ("ASoC: SOF: topology: Make control parsing IPC agnostic")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220331114757.32551-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc3-topology.c