From 8bfc622b181f800a66025689f248332dca1c31b1 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 31 May 2015 21:50:50 -0400 Subject: [PATCH] Fixed memory leaks in testfilesystem.c (thanks, Nitz!). Fixes Bugzilla #2991. --- test/testfilesystem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/testfilesystem.c b/test/testfilesystem.c index 51767f7ea..e1660c8d4 100644 --- a/test/testfilesystem.c +++ b/test/testfilesystem.c @@ -32,7 +32,7 @@ main(int argc, char *argv[]) return 0; } - SDL_Log("base path: '%s'\n", SDL_GetBasePath()); + SDL_Log("base path: '%s'\n", base_path); SDL_free(base_path); char *pref_path = SDL_GetPrefPath("libsdl", "testfilesystem"); @@ -41,12 +41,9 @@ main(int argc, char *argv[]) SDL_GetError()); return 0; } - SDL_Log("pref path: '%s'\n", SDL_GetPrefPath("libsdl", "testfilesystem")); + SDL_Log("pref path: '%s'\n", pref_path); SDL_free(pref_path); - SDL_Log("base path: '%s'\n", SDL_GetBasePath()); - SDL_Log("pref path: '%s'\n", SDL_GetPrefPath("libsdl", "testfilesystem")); - SDL_Quit(); return 0; }