diff --git a/src/filesystem/emscripten/SDL_sysfilesystem.c b/src/filesystem/emscripten/SDL_sysfilesystem.c index f5ea78902..02471d394 100644 --- a/src/filesystem/emscripten/SDL_sysfilesystem.c +++ b/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; }