Emscripten: Fixed memory leak if SDL_GetPrefPath() failed.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 15 Apr 2015 21:25:15 +0200
changeset 95593ca4f4ef7506
parent 9558 4bab88dd387e
child 9560 d1d80a69110b
Emscripten: Fixed memory leak if SDL_GetPrefPath() failed.
src/filesystem/emscripten/SDL_sysfilesystem.c
     1.1 --- a/src/filesystem/emscripten/SDL_sysfilesystem.c	Mon Apr 13 20:52:38 2015 +0200
     1.2 +++ b/src/filesystem/emscripten/SDL_sysfilesystem.c	Wed Apr 15 21:25:15 2015 +0200
     1.3 @@ -57,6 +57,7 @@
     1.4  
     1.5      if (mkdir(retval, 0700) != 0 && errno != EEXIST) {
     1.6          SDL_SetError("Couldn't create directory '%s': '%s'", retval, strerror(errno));
     1.7 +        SDL_free(retval);
     1.8          return NULL;
     1.9      }
    1.10