Fixed memory leaks in testfilesystem.c (thanks, Nitz!).
authorRyan C. Gordon <icculus@icculus.org>
Sun, 31 May 2015 21:50:50 -0400
changeset 9693 e8d9c63536f4
parent 9692 1982dc994254
child 9694 b847b89f4a64
Fixed memory leaks in testfilesystem.c (thanks, Nitz!). Fixes Bugzilla #2991.
test/testfilesystem.c
--- a/test/testfilesystem.c	Sun May 31 21:43:36 2015 -0400
+++ b/test/testfilesystem.c	Sun May 31 21:50:50 2015 -0400
@@ -32,7 +32,7 @@
       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 @@
                    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;
 }