From d88b6738f02430a1fa1bf79d579e41ece8003cb5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 26 May 2015 06:16:43 -0700 Subject: [PATCH] Fixed bug 2989 - Memory loss in clipboard_testClipboardTextFunctions --- test/testautomation_clipboard.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/testautomation_clipboard.c b/test/testautomation_clipboard.c index 9ce4f5149..f943ffee7 100644 --- a/test/testautomation_clipboard.c +++ b/test/testautomation_clipboard.c @@ -103,6 +103,7 @@ clipboard_testClipboardTextFunctions(void *arg) intResult); charResult = SDL_GetClipboardText(); SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); + SDL_free(charResult); boolResult = SDL_HasClipboardText(); SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); SDLTest_AssertCheck( @@ -137,6 +138,7 @@ clipboard_testClipboardTextFunctions(void *arg) boolResult == SDL_TRUE, "Verify SDL_HasClipboardText returned SDL_TRUE, got %s", (boolResult) ? "SDL_TRUE" : "SDL_FALSE"); + SDL_free(charResult); charResult = SDL_GetClipboardText(); SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); SDLTest_AssertCheck(