SDL: x11: fix memory leak in GetMonitorInfo

From 1d8262218f4d07571502804af66ee9b378a5c1cd Mon Sep 17 00:00:00 2001
From: onesixromcom <[EMAIL REDACTED]>
Date: Sat, 26 Sep 2026 01:55:21 +0300
Subject: [PATCH] x11: fix memory leak in GetMonitorInfo

Fixes https://github.com/libsdl-org/SDL/issues/16385
---
 src/video/x11/SDL_x11modes.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c
index 37068b9508b28..b79527cdd6fde 100644
--- a/src/video/x11/SDL_x11modes.c
+++ b/src/video/x11/SDL_x11modes.c
@@ -586,6 +586,10 @@ static MonitorInfo *GetMonitorInfo(Display *dpy, int screen, RROutput output, bo
                     break;
                 }
             }
+
+            if (props) {
+                X11_XFree(props);
+            }
         }
     }