* Fix memory leak in ftmac.c, patch by Jjgod Jiang
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/ChangeLog b/ChangeLog
index 6f202b9..be4712b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ * src/base/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Fix memory
+ leak, patch by "Jjgod Jiang" <gzjjgod@gmail.com>.
+ * builds/mac/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Ditto.
+
2007-02-16 Werner Lemberg <wl@gnu.org>
* src/truetype/ttinterp.c (Ins_MD): Remove unused variable.
diff --git a/builds/mac/ftmac.c b/builds/mac/ftmac.c
index 4c0788f..d6a8558 100644
--- a/builds/mac/ftmac.c
+++ b/builds/mac/ftmac.c
@@ -283,6 +283,7 @@
kCFStringEncodingMacRoman );
ats_font_id = ATSFontFindFromName( cf_fontName,
kATSOptionFlagsUnRestrictedScope );
+ CFRelease(cf_fontName);
if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )
return FT_Err_Unknown_File_Format;
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index 1347d7d..d696586 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -145,6 +145,7 @@
kCFStringEncodingMacRoman );
ats_font_id = ATSFontFindFromName( cf_fontName,
kATSOptionFlagsUnRestrictedScope );
+ CFRelease( cf_fontName );
if ( ats_font_id == 0 || ats_font_id == 0xFFFFFFFFUL )
return FT_Err_Unknown_File_Format;