Fixed bug #7302 - Memory 'leak' in SDL_SetMouseSystemScale()
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index fa0a582..5d8d1d2 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -912,6 +912,12 @@ void SDL_MouseQuit(void)
}
mouse->num_clickstates = 0;
+ if (mouse->system_scale_values) {
+ SDL_free(mouse->system_scale_values);
+ mouse->system_scale_values = NULL;
+ }
+ mouse->num_system_scale_values = 0;
+
SDL_DelHintCallback(SDL_HINT_MOUSE_DOUBLE_CLICK_TIME,
SDL_MouseDoubleClickTimeChanged, mouse);