Fixed bug 2989 - Memory loss in clipboard_testClipboardTextFunctions
authorSam Lantinga <slouken@libsdl.org>
Tue, 26 May 2015 06:16:43 -0700
changeset 9617 062bfde7330a
parent 9616 eb2a8d9cfb74
child 9618 5eec9af4374c
Fixed bug 2989 - Memory loss in clipboard_testClipboardTextFunctions
test/testautomation_clipboard.c
--- a/test/testautomation_clipboard.c	Mon May 25 16:22:09 2015 -0700
+++ b/test/testautomation_clipboard.c	Tue May 26 06:16:43 2015 -0700
@@ -103,6 +103,7 @@
             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 @@
         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(