Skip to content

Commit

Permalink
[ALSA] NULL pointer dereference in sound/synth/emux/soundfont.c
Browse files Browse the repository at this point in the history
this is about coverity id torvalds#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@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
SesterhennEric authored and Jaroslav Kysela committed Jun 22, 2006
1 parent f26eb78 commit d20cad6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/synth/emux/soundfont.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ snd_soundfont_load(struct snd_sf_list *sflist, const void __user *data,
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 {
Expand Down

0 comments on commit d20cad6

Please sign in to comment.