- check the return value of malloc & co.

This commit is contained in:
Takashi Iwai 2004-02-25 11:24:29 +00:00
parent 7e6569e300
commit d91948db49
7 changed files with 42 additions and 0 deletions

View file

@ -439,6 +439,8 @@ static int snd_pcm_adpcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
}
assert(!adpcm->states);
adpcm->states = malloc(adpcm->plug.slave->channels * sizeof(*adpcm->states));
if (adpcm->states == NULL)
return -ENOMEM;
return 0;
}