Skip to content

Commit

Permalink
ASoC: dapm: Initialize private_value in snd_soc_dapm_new_dai
Browse files Browse the repository at this point in the history
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 <pankaj.laxminarayan.bharadiya@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Pankaj Bharadiya authored and Mark Brown committed Mar 25, 2019
1 parent 78540a2 commit 8633d44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8633d44

Please sign in to comment.