SDL: Clean up window properties when the window is destroyed

From a02afbaea58e00054144827f00bca8a2c88abcf0 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 7 Nov 2023 09:57:33 -0800
Subject: [PATCH] Clean up window properties when the window is destroyed

---
 src/video/SDL_video.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 9b1a199fb45a..3ef3cd98a474 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -3533,6 +3533,8 @@ void SDL_DestroyWindow(SDL_Window *window)
 
     SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_DESTROYED, 0, 0);
 
+    SDL_DestroyProperties(window->props);
+
     /* If this is a child window, unlink it from its siblings */
     if (window->parent) {
         if (window->next_sibling) {