Skip to content

Commit

Permalink
Fixed memory leaks in testfilesystem.c (thanks, Nitz!).
Browse files Browse the repository at this point in the history
Fixes Bugzilla #2991.
  • Loading branch information
icculus committed Jun 1, 2015
1 parent 7619ad3 commit 8bfc622
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/testfilesystem.c
Expand Up @@ -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");
Expand All @@ -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;
}

0 comments on commit 8bfc622

Please sign in to comment.