mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
fix a possible memory leak in SDL_vasprintf()
This commit is contained in:
@@ -2201,6 +2201,7 @@ int SDL_vasprintf(char **strp, const char *fmt, va_list ap)
|
|||||||
|
|
||||||
/* Check error code */
|
/* Check error code */
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
|
SDL_free(p);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user