Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 3093 - Memory Leak in TTF_RenderUTF8_Blended_Wrapped
Pankaj I have found that in function "SDL_Surface *TTF_RenderUTF8_Blended_Wrapped(TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength)" It is allocating "str" then allocating "strLines". If "strLines" fails to allocate, error for out of memory is set and returned NULL. But memory allocated for "str" is not freed. There should be code for freeing the memory allocated to "str" in do-while loop where NULL has returned for allocating "strLines"
- Loading branch information