diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-03-22 08:30:20 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-03-22 08:30:20 +0100 |
commit | bae84e70d66fe46c12231082cf1c4848ea22f3ef (patch) | |
tree | c0994ef3f0e306583c5619da8fd6498fd932dd24 /sound | |
parent | ea823c08912cfb6d4af2fa8b6dd5d8deb2fb486a (diff) | |
download | op-kernel-dev-bae84e70d66fe46c12231082cf1c4848ea22f3ef.zip op-kernel-dev-bae84e70d66fe46c12231082cf1c4848ea22f3ef.tar.gz |
ALSA: hda - Fix access-after-free in patch_realtek.c
alc_free_kctls() has to be called after all jobs done in alc_build_controls().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 4ec5763..053d53d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2532,8 +2532,6 @@ static int alc_build_controls(struct hda_codec *codec) return err; } - alc_free_kctls(codec); /* no longer needed */ - /* assign Capture Source enums to NID */ kctl = snd_hda_find_mixer_ctl(codec, "Capture Source"); if (!kctl) @@ -2602,6 +2600,9 @@ static int alc_build_controls(struct hda_codec *codec) } } } + + alc_free_kctls(codec); /* no longer needed */ + return 0; } |