Skip to content

Commit

Permalink
[ALSA] fix usbmixer double kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dave Jones authored and Jaroslav Kysela committed Mar 22, 2006
1 parent 4fcf011 commit a2df813
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion sound/usb/usbmixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a2df813

Please sign in to comment.