]> git.alsa-project.org Git - alsa-lib.git/commit
async: fix snd_async_del_handler for TIMER type
authorJin Li <jinli@lanxincomputing.com>
Tue, 15 Sep 2026 11:42:05 +0000 (11:42 +0000)
committerJaroslav Kysela <perex@perex.cz>
Mon, 30 Nov 2026 14:21:13 +0000 (15:21 +0100)
commitfe8fb0dd47d0b9440cd92f00c59b58ea03c39107
tree8a010289c4b0fd4d53ebfb504f905d35b76cf362
parent8c8949be7c46bcf339d728d034fcec1a92e78582
async: fix snd_async_del_handler for TIMER type

snd_async_del_handler() has two switch statements that handle
PCM and CTL handler types, but not TIMER. When a TIMER type
handler is deleted, both switches fall through to default and
trigger assert(0), crashing any program that uses
snd_async_add_timer_handler().

Add the missing SND_ASYNC_HANDLER_TIMER cases to both switches,
and include timer_local.h to access struct _snd_timer.

Closes: https://github.com/alsa-project/alsa-lib/pull/525
Signed-off-by: Jin Li <jinli@lanxincomputing.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/async.c