提交 a2df813b 编写于 作者: D Dave Jones 提交者: Jaroslav Kysela

[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: NDave Jones <davej@redhat.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 4fcf0117
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册