mirror of
https://github.com/yawut/SDL.git
synced 2026-06-11 19:22:14 -05:00
Emscripten: Fixed memory leak if SDL_GetPrefPath() failed.
This commit is contained in:
parent
6d57df4eb0
commit
d4bf7188db
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user