b=430979, CGFont leaks -- patch from upstream; r=me, a=damon

This commit is contained in:
vladimir@pobox.com 2008-04-28 14:27:35 -07:00
Родитель fb8045c358
Коммит 1c80f5912a
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -343,6 +343,8 @@ _cairo_quartz_font_create_toy(cairo_toy_font_face_t *toy_face,
} }
face = cairo_quartz_font_face_create_for_cgfont (cgFont); face = cairo_quartz_font_face_create_for_cgfont (cgFont);
CGFontRelease (cgFont);
if (face->status) if (face->status)
return face->status; return face->status;
@ -780,8 +782,13 @@ cairo_quartz_font_face_create_for_atsu_font_id (ATSUFontID font_id)
{ {
ATSFontRef atsFont = FMGetATSFontRefFromFont (font_id); ATSFontRef atsFont = FMGetATSFontRefFromFont (font_id);
CGFontRef cgFont = CGFontCreateWithPlatformFont (&atsFont); CGFontRef cgFont = CGFontCreateWithPlatformFont (&atsFont);
cairo_font_face_t *ff;
return cairo_quartz_font_face_create_for_cgfont (cgFont); ff = cairo_quartz_font_face_create_for_cgfont (cgFont);
CGFontRelease (cgFont);
return ff;
} }
/* This is the old name for the above function, exported for compat purposes */ /* This is the old name for the above function, exported for compat purposes */