From c962e1e02125b4afd42ba9556c95f8bd7d6ea29c Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 12 Nov 2010 18:40:44 +0000 Subject: [PATCH] Free the data of each font attachment in Font_UnloadFont git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10587 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=277da881871d0b87f044765618f2b3297457bea7 --- ft2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ft2.c b/ft2.c index 1079b5db..f395e39b 100644 --- a/ft2.c +++ b/ft2.c @@ -957,6 +957,10 @@ void Font_UnloadFont(ft2_font_t *font) int i; if (font->attachments && font->attachmentcount) { + for (i = 0; i < font->attachmentcount; ++i) { + if (font->attachments[i].data) + Mem_Free(font->attachments[i].data); + } Mem_Free(font->attachments); font->attachmentcount = 0; font->attachments = NULL; -- 2.39.2