Skip to content
Permalink
Browse files

Emscripten: Fixed memory leak if SDL_GetPrefPath() failed.

  • Loading branch information
philippwiesemann committed Apr 15, 2015
1 parent e97fc56 commit 86fb92a7da6c0121c3c932bc7e6e887691102aa9
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/filesystem/emscripten/SDL_sysfilesystem.c
@@ -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;
}

0 comments on commit 86fb92a

Please sign in to comment.