diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2007-03-28 22:35:52 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2007-03-28 22:35:52 +0200 |
commit | 4802c31e31c845cfe044dc66a0615363534066e9 (patch) | |
tree | ae4d587f161434660d8289bb02c9ed8097cb1738 | |
parent | 8e617c8834fe2dde4e88ea9c2dcd9530c5b30839 (diff) | |
download | lwn-4802c31e31c845cfe044dc66a0615363534066e9.tar.gz lwn-4802c31e31c845cfe044dc66a0615363534066e9.zip |
[ALSA] fix NULL pointer dereference in sound/synth/emux/soundfont.c
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@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r-- | sound/synth/emux/soundfont.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c index 4c5754d4a2e8..56d48a1db2dd 100644 --- a/sound/synth/emux/soundfont.c +++ b/sound/synth/emux/soundfont.c @@ -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 { |