forked from Minki/linux
[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>
This commit is contained in:
parent
d61975fc6b
commit
878b478919
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user