diff options
author | Dave Jones <davej@redhat.com> | 2006-03-06 13:28:34 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 10:35:57 +0100 |
commit | bcc54f9a563f146e723ead16c76f842bcaeb694e (patch) | |
tree | 73a31717b1fb3d2b24f1d54c2b2684f90f51b99d /sound/isa/sb | |
parent | c27e8c591854ef349fdf5bec777355dae04bb48f (diff) | |
download | op-kernel-dev-bcc54f9a563f146e723ead16c76f842bcaeb694e.zip op-kernel-dev-bcc54f9a563f146e723ead16c76f842bcaeb694e.tar.gz |
[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/isa/sb')
-rw-r--r-- | sound/isa/sb/sb_mixer.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c index 1a6ee34..490b1ca 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; } |