From: Jaroslav Kysela Date: Tue, 8 May 2001 08:57:30 +0000 (+0000) Subject: Fixed NULL pointer dereference, added Intel i8x0 X-Git-Tag: v1.0.3~853 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=c6c1de70ddf84333f14b5a07b5eb517e12768bc5;p=alsa-lib.git Fixed NULL pointer dereference, added Intel i8x0 --- diff --git a/src/pcm/pcm_surr.c b/src/pcm/pcm_surr.c index fdefbce7..77743ebb 100644 --- a/src/pcm/pcm_surr.c +++ b/src/pcm/pcm_surr.c @@ -484,7 +484,7 @@ static int snd_pcm_surround_free(snd_pcm_surround_t *surr) snd_pcm_close(surr->pcm[i]); surr->pcm[i] = NULL; } - if (surr->po->sclose) + if (surr->po && surr->po->sclose) surr->po->sclose(surr); if (surr->ctl) snd_ctl_close(surr->ctl); @@ -812,6 +812,7 @@ static surround_open_t open_table[] = { { type: SND_CARD_TYPE_ENS1370, flags: SURR_FLG_NO_6CH|SURR_FLG_NO_CTL_CLOSE|SURR_FLG_FD1, scount: count_generic, sopen: open_ens1370, sclose: close_ens1370 }, { type: SND_CARD_TYPE_YMFPCI, flags: SURR_FLG_NO_6CH, scount: count_ymfpci, sopen: open_ymfpci, sclose: NULL }, { type: SND_CARD_TYPE_TRID4DWAVENX, flags: SURR_FLG_NO_6CH|SURR_FLG_NO_CTL_CLOSE, scount: count_trid4nx, sopen: open_trid4nx, sclose: close_trid4nx }, + { type: SND_CARD_TYPE_INTEL8X0, flags: 0, scount: count_generic, sopen: open_fm801, sclose: NULL }, { type: SND_CARD_TYPE_NONE, flags: 0, scount: NULL, sopen: NULL, sclose: NULL } };