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

[ALSA] sound/isa/sb/sb_mixer.c double kfree

Modules: SB drivers

snd_ctl_add() already does the free on error.

Coverity bug #957
Signed-off-by: NDave Jones <davej@redhat.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 c27e8c59
...@@ -453,10 +453,8 @@ int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int ty ...@@ -453,10 +453,8 @@ int snd_sbmixer_add_ctl(struct snd_sb *chip, const char *name, int index, int ty
strlcpy(ctl->id.name, name, sizeof(ctl->id.name)); strlcpy(ctl->id.name, name, sizeof(ctl->id.name));
ctl->id.index = index; ctl->id.index = index;
ctl->private_value = value; ctl->private_value = value;
if ((err = snd_ctl_add(chip->card, ctl)) < 0) { if ((err = snd_ctl_add(chip->card, ctl)) < 0)
snd_ctl_free_one(ctl);
return err; return err;
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册