mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-17 22:05:18 -05: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
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue