diff options
author | Dave Jones <davej@redhat.com> | 2006-12-15 00:40:39 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-12-15 00:40:39 +0100 |
commit | ea09f457941054d56297f94930020bcfbbd0b772 (patch) | |
tree | 2408248765f99a5e4a0e0c320282ba272d9f60e8 /sound | |
parent | 7819bfbbad648b4f97a07932b9383eb3a2c3f39c (diff) |
[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 <davej@redhat.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/usbmixer.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 678dac2d4db..0bfea723739 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; |