From 239305f65ec15aa398bb3fa1611ecf0fa0180365 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 2 Feb 2025 16:20:59 -0800
Subject: [PATCH] Fixed memory leak in SDL_GetNumVideoDisplays()
---
src/sdl2_compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index 0175ef7..dcbe005 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -6593,7 +6593,7 @@ SDL_DECLSPEC int SDLCALL
SDL_GetNumVideoDisplays(void)
{
int count = 0;
- SDL3_GetDisplays(&count);
+ SDL_free(SDL3_GetDisplays(&count));
return count;
}