فهرست منبع

Fixed memory leaks in testfilesystem.c (thanks, Nitz!).

Fixes Bugzilla #2991.
Ryan C. Gordon 10 سال پیش
والد
کامیت
8bfc622b18
1فایلهای تغییر یافته به همراه2 افزوده شده و 5 حذف شده
  1. 2 5
      test/testfilesystem.c

+ 2 - 5
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;
 }