mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-26 18:43:33 -05:00
[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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue