Fixed NULL pointer dereference, added Intel i8x0

This commit is contained in:
Jaroslav Kysela 2001-05-08 08:57:30 +00:00
parent 6599731473
commit c6c1de70dd

View file

@ -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 }
};