mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
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>
This commit is contained in:
parent
ea823c0891
commit
bae84e70d6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user