From: divverent Date: Fri, 12 Nov 2010 18:40:44 +0000 (+0000) Subject: Free the data of each font attachment in Font_UnloadFont X-Git-Tag: xonotic-v0.1.0preview~56^2~30 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=277da881871d0b87f044765618f2b3297457bea7;p=xonotic%2Fdarkplaces.git 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 --- diff --git a/ft2.c b/ft2.c index 9f7c3680..f5efcabb 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;