From e94b04c8f867382ce6835254d29ee54fe855c686 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 3 Jun 2021 09:50:52 +0200 Subject: [PATCH] sndio: fix crash when volume is adjusted while stopped Set volume/mute function pointers when handle is freed, to ensure sio_setvol() is not called on a freed handle. Fixes crashes when volume is adjusted while playback is stopped. Fixes #25796 --- modules/audio_output/sndio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/audio_output/sndio.c b/modules/audio_output/sndio.c index 642113a487..69bb0b8a42 100644 --- a/modules/audio_output/sndio.c +++ b/modules/audio_output/sndio.c @@ -208,6 +208,8 @@ static void Stop (audio_output_t *aout) { aout_sys_t *sys = aout->sys; + aout->volume_set = NULL; + aout->mute_set = NULL; sio_close (sys->hdl); }