mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Added extra initialization for hlist
This commit is contained in:
parent
05d06f02b3
commit
7b569ec413
1 changed files with 3 additions and 1 deletions
|
|
@ -89,6 +89,7 @@ int snd_async_add_handler(snd_async_handler_t **handler, int fd,
|
|||
h->private_data = private_data;
|
||||
was_empty = list_empty(&snd_async_handlers);
|
||||
list_add_tail(&h->glist, &snd_async_handlers);
|
||||
INIT_LIST_HEAD(&h->hlist);
|
||||
*handler = h;
|
||||
if (was_empty) {
|
||||
int err;
|
||||
|
|
@ -129,7 +130,8 @@ int snd_async_del_handler(snd_async_handler_t *handler)
|
|||
}
|
||||
if (handler->type == SND_ASYNC_HANDLER_GENERIC)
|
||||
goto _end;
|
||||
list_del(&handler->hlist);
|
||||
if (!list_empty(&handler->hlist))
|
||||
list_del(&handler->hlist);
|
||||
if (!list_empty(&handler->hlist))
|
||||
goto _end;
|
||||
switch (handler->type) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue