Skip to contentSkip to conversation

sound/isa/sb/sb_mixer.c double kfree

PATCH Dave Jones 1 participant 1 message Mar 6, 2006 Sound

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

snd_ctl_add() already does the free on error.

Coverity bug #957

sound/isa/sb/sb_mixer.c renamed from sound/isa/sb/sb_mixer.c~ +1 -3
@@ -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;
 }
 
Signature · 1 line
http://www.codemonkey.org.uk