SDL: test: plug leaks of testmouse and testrwlock

From 17a891daa86d226e071a17ff34dc90c146c5d307 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Mon, 17 Nov 2025 13:24:44 +0100
Subject: [PATCH] test: plug leaks of testmouse and testrwlock

---
 test/testmouse.c  | 5 +++++
 test/testrwlock.c | 1 +
 2 files changed, 6 insertions(+)

diff --git a/test/testmouse.c b/test/testmouse.c
index 3cf5e9703677b..094b763ddf8e5 100644
--- a/test/testmouse.c
+++ b/test/testmouse.c
@@ -345,6 +345,11 @@ int main(int argc, char *argv[])
     }
 #endif
 
+    while (active) {
+        Object *next = active->next;
+        SDL_free(next);
+        active = next;
+    }
     SDL_DestroyRenderer(loop_data.renderer);
     SDL_DestroyWindow(window);
 
diff --git a/test/testrwlock.c b/test/testrwlock.c
index a80873c92467a..875bbef9be95c 100644
--- a/test/testrwlock.c
+++ b/test/testrwlock.c
@@ -166,6 +166,7 @@ int main(int argc, char *argv[])
     for (i = 0; i < nb_threads; ++i) {
         SDL_WaitThread(threads[i], NULL);
     }
+    SDL_free(threads);
 
     SDL_Log("Reader threads have terminated, quitting!");
     SDL_DestroyRWLock(rwlock);