From a2df813beab42740fa8043b3fdc9e1d15784b9ec Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Mon, 6 Mar 2006 13:26:10 +0100 Subject: [ALSA] fix usbmixer double kfree Modules: USB generic driver 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: Takashi Iwai --- sound/usb/usbmixer.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/usb/usbmixer.c') 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; -- cgit v1.2.3