summaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-03-06 13:26:10 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:35:19 +0100
commita2df813beab42740fa8043b3fdc9e1d15784b9ec (patch)
tree70b83d5edd48ad5a4649e7bb5a3bf3e8ab4fd07b /sound/usb
parent4fcf0117d599965a5916985c9923776628e16779 (diff)
downloadop-kernel-dev-a2df813beab42740fa8043b3fdc9e1d15784b9ec.zip
op-kernel-dev-a2df813beab42740fa8043b3fdc9e1d15784b9ec.tar.gz
[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 <davej@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usbmixer.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index 678dac2..0bfea72 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;
OpenPOWER on IntegriCloud