lkml.org 
[lkml]   [2006]   [Mar]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateMon, 6 Mar 2006 03:49:51 -0500
FromDave Jones <>
Subjectfix usbmixer double kfree.
snd_ctl_add() kfree's the kcontrol already if we fail there,
so this driver is currently doing a double kfree.

Coverity bug #959

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6/sound/usb/usbmixer.c~	2006-03-06 03:40:20.000000000 -0500
+++ linux-2.6/sound/usb/usbmixer.c	2006-03-06 03:45:03.000000000 -0500
@@ -434,7 +434,6 @@ static int add_control_to_empty(struct m
 		kctl->id.index++;
 	if ((err = snd_ctl_add(state->chip->card, kctl)) < 0) {
 		snd_printd(KERN_ERR "cannot add control (err = %d)\n", err);
-		snd_ctl_free_one(kctl);
 		return err;
 	}
 	cval->elem_id = &kctl->id;
-- 
http://www.codemonkey.org.uk
-
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-06 12:09    [from the cache]
©2003-2008