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