]> err.no Git - linux-2.6/commit
[ALSA] fix potential NULL pointer deref in snd_sb8dsp_midi_interrupt()
authorJesper Juhl <jesper.juhl@gmail.com>
Tue, 13 Jun 2006 09:58:12 +0000 (11:58 +0200)
committerJaroslav Kysela <perex@suse.cz>
Thu, 22 Jun 2006 19:34:22 +0000 (21:34 +0200)
commit63eb1e4bd2975f1d1102c1f44e4fd6fcd76f7792
tree6768bcbdfba41b7e4a79f5faee5d4f117e076321
parent6540dffa6ecfe0d99fb263548dcc4b35ccefe784
[ALSA] fix potential NULL pointer deref in snd_sb8dsp_midi_interrupt()

First testing if a pointer is NULL and if it is (or might be), proceeding
with code that dereferences that same pointer is clearly a mistake.
This happens in sound/isa/sb/sb8_midi.c::snd_sb8dsp_midi_interrupt()
The patch below reworks the code so this unfortunate case doesn't happen.
Also remove some blank comments.
Found by the Coverity checker as bug #367
Patch is compile testted only due to lack of hardware.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/isa/sb/sb8_midi.c