alsa: Fix use-after-free when reinitializing
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();
}