aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-03-06 13:28:34 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:35:57 +0100
commitbcc54f9a563f146e723ead16c76f842bcaeb694e (patch)
tree73a31717b1fb3d2b24f1d54c2b2684f90f51b99d /sound
parentc27e8c591854ef349fdf5bec777355dae04bb48f (diff)
[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: Dave Jones <davej@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/isa/sb/sb_mixer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c
index 1a6ee344ddd..490b1ca5cf5 100644
--- a/sound/isa/sb/sb_mixer.c
+++ b/sound/isa/sb/sb_mixer.c
@@ -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));
ctl->id.index = index;
ctl->private_value = value;
- if ((err = snd_ctl_add(chip->card, ctl)) < 0) {
- snd_ctl_free_one(ctl);
+ if ((err = snd_ctl_add(chip->card, ctl)) < 0)
return err;
- }
return 0;
}