- 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

@ -1630,6 +1630,10 @@ int _snd_pcm_share_open(snd_pcm_t **pcmp, const char *name,
goto _free;
}
channels_map = calloc(channels, sizeof(*channels_map));
if (! channels_map) {
err = -ENOMEM;
goto _free;
}
snd_config_for_each(i, next, bindings) {
snd_config_t *n = snd_config_iterator_entry(i);