From ec6b21bd91b72650c98ac3f76059a72f274ccb60 Mon Sep 17 00:00:00 2001 From: noshbar Date: Wed, 10 Oct 2018 22:41:20 +0200 Subject: [PATCH] Fixes memory leak in text.c GenImageFontAtlas() allocates an array of stbrp_rect for the packing functions, but it never frees them. --- src/text.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/text.c b/src/text.c index 3dbb261b..d8fb3c98 100644 --- a/src/text.c +++ b/src/text.c @@ -527,6 +527,7 @@ Image GenImageFontAtlas(CharInfo *chars, int charsCount, int fontSize, int paddi else TraceLog(LOG_WARNING, "Character could not be packed: %i", i); } + free(rects); free(nodes); free(context); }