ref: 7643b5839ba57cb578ec01b71ccbc4f0570c1498
parent: b185747dd6128526e4794a0768ac42b1570cc302
author: Werner Lemberg <[email protected]>
date: Sat Oct 17 11:51:29 EDT 2015
* src/cid/cidgload.c (cid_load_glyph): Fix memory leak. Reported by Kostya Serebryany <[email protected]>.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2015-10-17 Werner Lemberg <[email protected]>
+ * src/cid/cidgload.c (cid_load_glyph): Fix memory leak.
+
+ Reported by Kostya Serebryany <[email protected]>.
+
+2015-10-17 Werner Lemberg <[email protected]>
+
[bdf] Prevent memory leak (#46217).
* src/bdf/bdflib.c (_bdf_parse_glyphs) <STARTCHAR>: Check
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -167,8 +167,6 @@
glyph_length - cs_offset );
}
- FT_FREE( charstring );
-
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* Incremental fonts can optionally override the metrics. */
@@ -193,6 +191,8 @@
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
Exit:
+ FT_FREE( charstring );
+
return error;
}