From: Dave Jones Date: Mon, 6 Mar 2006 12:26:10 +0000 (+0100) Subject: [ALSA] fix usbmixer double kfree X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a2df813beab42740fa8043b3fdc9e1d15784b9ec;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [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 --- 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;