mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Fixes: 5600b901 ("async: snd_async_del_handler - move clear signal using sigaction as last")
A wrong list head is used to check if the given list with async handlers is empty. Correct this. Link: https://github.com/alsa-project/alsa-lib/issues/394 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
645668dca2
commit
3b9f3b9431
1 changed files with 15 additions and 2 deletions
17
src/async.c
17
src/async.c
|
|
@ -153,9 +153,22 @@ int snd_async_del_handler(snd_async_handler_t *handler)
|
||||||
int was_empty;
|
int was_empty;
|
||||||
assert(handler);
|
assert(handler);
|
||||||
if (handler->type != SND_ASYNC_HANDLER_GENERIC) {
|
if (handler->type != SND_ASYNC_HANDLER_GENERIC) {
|
||||||
if (!list_empty(&handler->hlist))
|
struct list_head *alist;
|
||||||
|
switch (handler->type) {
|
||||||
|
#ifdef BUILD_PCM
|
||||||
|
case SND_ASYNC_HANDLER_PCM:
|
||||||
|
alist = &handler->u.pcm->async_handlers;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
case SND_ASYNC_HANDLER_CTL:
|
||||||
|
alist = &handler->u.ctl->async_handlers;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
|
if (!list_empty(alist))
|
||||||
list_del(&handler->hlist);
|
list_del(&handler->hlist);
|
||||||
if (!list_empty(&handler->hlist))
|
if (!list_empty(alist))
|
||||||
goto _glist;
|
goto _glist;
|
||||||
switch (handler->type) {
|
switch (handler->type) {
|
||||||
#ifdef BUILD_PCM
|
#ifdef BUILD_PCM
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue