mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
fix segfault then hooks list is empty
This fix prevents segfaulting then hooks list is empty. Signed-off-by: Sasha Khapyorsky <sashak@smlink.com>
This commit is contained in:
parent
19284bd325
commit
474eb76b71
1 changed files with 2 additions and 1 deletions
|
|
@ -469,7 +469,7 @@ int _snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name,
|
|||
return err;
|
||||
}
|
||||
if (!hooks)
|
||||
return 0;
|
||||
goto _done;
|
||||
snd_config_for_each(i, next, hooks) {
|
||||
snd_config_t *n = snd_config_iterator_entry(i);
|
||||
const char *str;
|
||||
|
|
@ -488,6 +488,7 @@ int _snd_pcm_hooks_open(snd_pcm_t **pcmp, const char *name,
|
|||
return err;
|
||||
}
|
||||
}
|
||||
_done:
|
||||
*pcmp = rpcm;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue