From ea09f457941054d56297f94930020bcfbbd0b772 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Fri, 15 Dec 2006 00:40:39 +0100 Subject: [PATCH] [ALSA] fix 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 Signed-off-by: Adrian Bunk --- sound/usb/usbmixer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 678dac2d4dba..0bfea7237395 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c @@ -434,7 +434,6 @@ static int add_control_to_empty(struct mixer_build *state, struct snd_kcontrol * 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;