Fixed bug 2989 - Memory loss in clipboard_testClipboardTextFunctions

This commit is contained in:
Sam Lantinga 2015-05-26 06:16:43 -07:00
parent 507157abdb
commit d88b6738f0
1 changed files with 2 additions and 0 deletions

View File

@ -103,6 +103,7 @@ clipboard_testClipboardTextFunctions(void *arg)
intResult); intResult);
charResult = SDL_GetClipboardText(); charResult = SDL_GetClipboardText();
SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded");
SDL_free(charResult);
boolResult = SDL_HasClipboardText(); boolResult = SDL_HasClipboardText();
SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded"); SDLTest_AssertPass("Call to SDL_HasClipboardText succeeded");
SDLTest_AssertCheck( SDLTest_AssertCheck(
@ -137,6 +138,7 @@ clipboard_testClipboardTextFunctions(void *arg)
boolResult == SDL_TRUE, boolResult == SDL_TRUE,
"Verify SDL_HasClipboardText returned SDL_TRUE, got %s", "Verify SDL_HasClipboardText returned SDL_TRUE, got %s",
(boolResult) ? "SDL_TRUE" : "SDL_FALSE"); (boolResult) ? "SDL_TRUE" : "SDL_FALSE");
SDL_free(charResult);
charResult = SDL_GetClipboardText(); charResult = SDL_GetClipboardText();
SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded"); SDLTest_AssertPass("Call to SDL_GetClipboardText succeeded");
SDLTest_AssertCheck( SDLTest_AssertCheck(