mirror of https://github.com/libsdl-org/SDL.git
fix a possible memory leak in SDL_vasprintf()
This commit is contained in:
parent
59b37d0e5b
commit
1a83bf2399
|
|
@ -2201,6 +2201,7 @@ int SDL_vasprintf(char **strp, const char *fmt, va_list ap)
|
|||
|
||||
/* Check error code */
|
||||
if (retval < 0) {
|
||||
SDL_free(p);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue