AddPulseAudioDevice(): Fix use-after-free

This commit is contained in:
Petar Popovic authored and Sam Lantinga committed 2025-02-17 11:12:44 -08:00
1 parent 3b4cfc11f0
commit 6aef6ae9a8
1 file changed
+1 -1
+1 -1
View File
@@ -778,8 +778,8 @@ static void AddPulseAudioDevice(const bool recording, const char *description, c
SDL_free(handle);
} else {
handle->device_index = index;
SDL_AddAudioDevice(recording, description, &spec, handle);
}
SDL_AddAudioDevice(recording, description, &spec, handle);
}
}