mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-28 05:40:23 -04:00
- check the return value of malloc & co.
This commit is contained in:
parent
7e6569e300
commit
d91948db49
7 changed files with 42 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue