From b68e025c1b888a1d06e3617d768d616d5469f754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzuki=2C=20Toshiya=20=28=E9=88=B4=E6=9C=A8=E4=BF=8A?= =?UTF-8?q?=E5=93=89=29?= Date: Tue, 20 Feb 2007 02:37:36 +0000 Subject: [PATCH] * Fix memory leak in ftmac.c, patch by Jjgod Jiang --- ChangeLog | 6 ++++++ builds/mac/ftmac.c | 1 + src/base/ftmac.c | 1 + 3 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6f202b9f1..be4712ba0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-02-20 suzuki toshiya + + * src/base/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Fix memory + leak, patch by "Jjgod Jiang" . + * builds/mac/ftmac.c (FT_GetFileRef_From_Mac_ATS_Name): Ditto. + 2007-02-16 Werner Lemberg * src/truetype/ttinterp.c (Ins_MD): Remove unused variable. diff --git a/builds/mac/ftmac.c b/builds/mac/ftmac.c index 4c0788fd9..d6a8558ee 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 1347d7dbb..d69658607 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;