]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Free the data of each font attachment in Font_UnloadFont
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 12 Nov 2010 18:40:44 +0000 (18:40 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 12 Nov 2010 18:51:03 +0000 (19:51 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10587 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=277da881871d0b87f044765618f2b3297457bea7

ft2.c

diff --git a/ft2.c b/ft2.c
index 1079b5db52eba3d981dc5a3408fcc51e9e7badbc..f395e39ba6c7c5ad6a2847f16b896ff625541de9 100644 (file)
--- 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;