Commit 78013aeef9134816528cf32d65699484e056c57e

Cameron Gutman 2021-11-12T16:57:24

alsa: Fix use-after-free when reinitializing

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c
index b9062e2..d6f2a10 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();
 }