1
0
Fork 0

[ALSA] fix resource leak in usbmixer

Modules: USB generic driver

We may leak 'namelist' in sound/usb/usbmixer.c::parse_audio_selector_unit()

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
hifive-unleashed-5.1
Jesper Juhl 2006-03-20 11:27:13 +01:00 committed by Jaroslav Kysela
parent d61975fc6b
commit 878b478919
1 changed files with 1 additions and 0 deletions

View File

@ -1468,6 +1468,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, unsi
kctl = snd_ctl_new1(&mixer_selectunit_ctl, cval);
if (! kctl) {
snd_printk(KERN_ERR "cannot malloc kcontrol\n");
kfree(namelist);
kfree(cval);
return -ENOMEM;
}