lkml.org 
[lkml]   [2006]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectsound/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>

--- linux-2.6/sound/isa/sb/sb_mixer.c~ 2006-03-06 03:54:48.000000000 -0500
+++ linux-2.6/sound/isa/sb/sb_mixer.c 2006-03-06 03:55:06.000000000 -0500
@@ -453,10 +453,8 @@ int snd_sbmixer_add_ctl(struct snd_sb *c
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;
}

--
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-03-06 13:12    [W:0.029 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site