[PATCH] [UBUNTU:sound/synth/emux/] Fix NULL pointer dereference

crimsun at fungus.sh.nu crimsun at fungus.sh.nu
Fri Jun 2 21:16:39 UTC 2006

Subject: [PATCH] [UBUNTU:sound/synth/emux/] Fix NULL pointer dereference

UpstreamStatus: Added in upstream hg alsa-kernel changeset 96e63842ba5d

Takashi Iwai committed this fix from Eric Sesterhenn for Coverity #100
with the following context:

"It seems the if statement is negated, since the else branch calls
remove_info() with sflist->currsf as a parameter where it gets

Signed-off-by: Daniel T Chen <crimsun at ubuntu.com>
Signed-off-by: Eric Sesterhenn <snakebyte at gmx.de>


 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 d0925ea..ebbc2a7 100644
--- a/sound/synth/emux/soundfont.c
+++ b/sound/synth/emux/soundfont.c
@@ -183,7 +183,7 @@ snd_soundfont_load(snd_sf_list_t *sflist
 		/* patch must be opened */
-		if (sflist->currsf) {
+		if (!sflist->currsf) {
 			snd_printk("soundfont: remove_info: patch not opened\n");
 			rc = -EINVAL;
 		} else {

Daniel T. Chen            crimsun at ubuntu.com
GPG key:   www.sh.nu/~crimsun/pubkey.gpg.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20060602/18594117/attachment.sig>

More information about the kernel-team mailing list