Skip to content

Commit

Permalink
Emscripten: Fixed memory leak if SDL_GetPrefPath() failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
philippwiesemann committed Apr 15, 2015
1 parent e97fc56 commit 86fb92a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/filesystem/emscripten/SDL_sysfilesystem.c
Expand Up @@ -57,6 +57,7 @@ SDL_GetPrefPath(const char *org, const char *app)

if (mkdir(retval, 0700) != 0 && errno != EEXIST) {
SDL_SetError("Couldn't create directory '%s': '%s'", retval, strerror(errno));
SDL_free(retval);
return NULL;
}

Expand Down

0 comments on commit 86fb92a

Please sign in to comment.