[PATCH] fix resource leak in usbmixer

From: Jesper Juhl
Date: Sat Mar 18 2006 - 17:24:57 EST


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

Signed-off-by: Jesper Juhl <jesper.juhl@xxxxxxxxx>
---

sound/usb/usbmixer.c | 1 +
1 files changed, 1 insertion(+)

--- linux-2.6.16-rc6-orig/sound/usb/usbmixer.c 2006-03-12 14:19:19.000000000 +0100
+++ linux-2.6.16-rc6/sound/usb/usbmixer.c 2006-03-18 23:23:53.000000000 +0100
@@ -1469,6 +1469,7 @@ static int parse_audio_selector_unit(str
kctl = snd_ctl_new1(&mixer_selectunit_ctl, cval);
if (! kctl) {
snd_printk(KERN_ERR "cannot malloc kcontrol\n");
+ kfree(namelist);
kfree(cval);
return -ENOMEM;
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/