Commit 98289a2a65a79c329f769882a45f6aada7123fc0

Tom Kacvinsky 2001-10-21T16:29:16

In function CFF_Done_Font, make sure to free the subfonts array to avoid a memory leak.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index 18a7ab6..3df2eab 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -2246,6 +2246,8 @@
     for ( index = 0; index < font->num_subfonts; index++ )
       CFF_Done_SubFont( memory, font->subfonts[index] );
 
+    FREE( font->subfonts );
+
     CFF_Done_Encoding( &font->encoding, font->stream );
     CFF_Done_Charset( &font->charset, font->stream );