mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 07:55:29 +00:00
fix a possible memory leak in SDL_vasprintf()
(cherry picked from commit 1a83bf2399c29f3028477225067bf6a106068f08)
This commit is contained in:
parent
e8f4045d0b
commit
93e51dd33e
|
@ -2004,6 +2004,7 @@ int SDL_vasprintf(char **strp, const char *fmt, va_list ap)
|
|||
|
||||
/* Check error code */
|
||||
if (retval < 0) {
|
||||
SDL_free(p);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -2025,5 +2026,3 @@ int SDL_vasprintf(char **strp, const char *fmt, va_list ap)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
Loading…
Reference in a new issue