From: Pankaj Bharadiya Date: Fri, 22 Mar 2019 16:23:39 +0000 (+0530) Subject: ASoC: dapm: Initialize private_value in snd_soc_dapm_new_dai X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8633d44002ba5c98f44bacc1397190adba832fd6;p=openwrt%2Fstaging%2Fblogic.git ASoC: dapm: Initialize private_value in snd_soc_dapm_new_dai In case of single config, private_value is left uninitialized. The private_value does need to be initialized or in snd_soc_dapm_new_control_unlocked() call failure case, it leads to a bogus free in snd_soc_dapm_free_kcontrol() Signed-off-by: Pankaj Bharadiya Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 1ec06ef6d161..74a6f5705f66 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -4038,7 +4038,7 @@ snd_soc_dapm_new_dai(struct snd_soc_card *card, struct snd_soc_pcm_runtime *rtd, struct snd_soc_dapm_widget template; struct snd_soc_dapm_widget *w; const char **w_param_text; - unsigned long private_value; + unsigned long private_value = 0; char *link_name; int ret;