shithub: freetype+ttf2subf

Download patch

ref: b68e025c1b888a1d06e3617d768d616d5469f754
parent: a091517a0455707bf2e0b34df4dca4f7b8289b77
author: Suzuki, Toshiya (鈴木俊哉) <[email protected]>
date: Mon Feb 19 21:37:36 EST 2007

* Fix memory leak in ftmac.c, patch by Jjgod Jiang

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-20  suzuki toshiya  <[email protected]>
+
+	* src/base/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Fix memory
+	leak, patch by "Jjgod Jiang" <[email protected]>.
+	* builds/mac/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Ditto.
+
 2007-02-16  Werner Lemberg  <[email protected]>
 
 	* src/truetype/ttinterp.c (Ins_MD): Remove unused variable.
--- 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;
--- 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;