public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sound/isa/sb/sb_mixer.c double kfree
@ 2006-03-06  8:56 Dave Jones
  0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2006-03-06  8:56 UTC (permalink / raw)
  To: tiwai; +Cc: Linux Kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-06  8:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-06  8:56 sound/isa/sb/sb_mixer.c double kfree Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox