lkml.org 
[lkml]   [2006]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fix resource leak in usbmixer
Date
We may leak 'namelist' in sound/usb/usbmixer.c::parse_audio_selector_unit()

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

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-18 23:30    [W:1.887 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site