Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2704364248378193a24505e414dbfd4201053349 Commit: 2704364248378193a24505e414dbfd4201053349 Parent: 3b542985edeed1a1af124ee055e2d35a30489d93 Author: Takashi Iwai <[EMAIL PROTECTED]> AuthorDate: Sat May 19 16:30:35 2007 +0200 Committer: Jaroslav Kysela <[EMAIL PROTECTED]> CommitDate: Thu May 31 09:06:02 2007 +0200
[ALSA] ali5451 - Fix possible NULL dereference Reported by Eric Sesterhenn. Fix the wrong checks of extra voice pointer, which may cause NULL dereferences. Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]> Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]> --- sound/pci/ali5451/ali5451.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index e1ed595..cb59f99 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c @@ -1250,7 +1250,7 @@ static int snd_ali_playback_hw_params(struct snd_pcm_substream *substream, evoice->substream = substream; } } else { - if (!evoice) { + if (evoice) { snd_ali_free_voice(codec, evoice); pvoice->extra = evoice = NULL; } @@ -1267,7 +1267,7 @@ static int snd_ali_playback_hw_free(struct snd_pcm_substream *substream) struct snd_ali_voice *evoice = pvoice ? pvoice->extra : NULL; snd_pcm_lib_free_pages(substream); - if (!evoice) { + if (evoice) { snd_ali_free_voice(codec, evoice); pvoice->extra = NULL; } @@ -1356,7 +1356,7 @@ static int snd_ali_playback_prepare(struct snd_pcm_substream *substream) VOL, CTRL, EC); - if (!evoice) { + if (evoice) { evoice->count = pvoice->count; evoice->eso = pvoice->count << 1; ESO = evoice->eso - 1; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html