From 78013aeef9134816528cf32d65699484e056c57e Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 12 Nov 2021 16:57:24 -0600 Subject: [PATCH] alsa: Fix use-after-free when reinitializing --- src/audio/alsa/SDL_alsa_audio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c index b9062e245..d6f2a1050 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -991,6 +991,7 @@ ALSA_Deinitialize(void) SDL_free(dev->name); SDL_free(dev); } + hotplug_devices = NULL; UnloadALSALibrary(); }