SDL: test: Free clipboard data after calling SDL_GetClipboardText()

From f4aca6866ca24a05bbfffbc848a362b484f7935a Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Mon, 13 May 2024 10:24:32 -0400
Subject: [PATCH] test: Free clipboard data after calling
 SDL_GetClipboardText()

Clipboard allocations were being leaked in two instances.
---
 test/testautomation_clipboard.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/testautomation_clipboard.c b/test/testautomation_clipboard.c
index bdc3b52d4904a..1b67434f184c5 100644
--- a/test/testautomation_clipboard.c
+++ b/test/testautomation_clipboard.c
@@ -168,6 +168,7 @@ static int clipboard_testClipboardDataFunctions(void *arg)
         text && SDL_strcmp(text, expected_text) == 0,
         "Verify clipboard text, expected \"%s\", got \"%s\"",
         expected_text, text);
+    SDL_free(text);
 
     boolResult = SDL_HasClipboardData(test_mime_types[TEST_MIME_TYPE_TEXT]);
     SDLTest_AssertCheck(
@@ -269,6 +270,7 @@ static int clipboard_testClipboardDataFunctions(void *arg)
         text && SDL_strcmp(text, expected_text) == 0,
         "Verify clipboard text, expected \"%s\", got \"%s\"",
         expected_text, text);
+    SDL_free(text);
 
     boolResult = SDL_HasClipboardData(test_mime_types[TEST_MIME_TYPE_TEXT]);
     SDLTest_AssertCheck(