summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-12-15 00:39:47 +0100
committerAdrian Bunk <bunk@stusta.de>2006-12-15 00:39:47 +0100
commit7819bfbbad648b4f97a07932b9383eb3a2c3f39c (patch)
tree2711bca5eb5a272c19a298fdf72829502e65b1aa /sound
parent6f6c1475b6083f4d3ae4e0325084ff6631389ca6 (diff)
[ALSA] sound/isa/sb/sb_mixer.c double kfree
snd_ctl_add() already does the free on error. Coverity bug #957 Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Adrian Bunk <bunk@stusta.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 1a6ee344dddb..490b1ca5cf58 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;
}