[Patch] NULL pointer dereference in sound/synth/emux/soundfont.c

From: Eric Sesterhenn
Date: Tue May 30 2006 - 16:17:36 EST


hi,

this is about coverity id #100.
It seems the if statement is negated, since the else branch calls
remove_info() with sflist->currsf as a parameter where it gets
dereferenced.

Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>

--- linux-2.6.17-rc4-git2/sound/synth/emux/soundfont.c.orig 2006-05-30 22:08:40.000000000 +0200
+++ linux-2.6.17-rc4-git2/sound/synth/emux/soundfont.c 2006-05-30 22:08:51.000000000 +0200
@@ -195,7 +195,7 @@ snd_soundfont_load(struct snd_sf_list *s
break;
case SNDRV_SFNT_REMOVE_INFO:
/* patch must be opened */
- if (sflist->currsf) {
+ if (!sflist->currsf) {
snd_printk("soundfont: remove_info: patch not opened\n");
rc = -EINVAL;
} else {


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/