Fixed a possible memory leak in case that FT_Glyph_To_Bitmap() fails

This commit is contained in:
Takeshi Abe 2009-11-01 05:04:35 +00:00
parent f7420d58da
commit 94cb01177a

View File

@ -1090,6 +1090,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
if (render) {
if (image->format != ft_glyph_format_bitmap && FT_Glyph_To_Bitmap(&image, ft_render_mode_normal, 0, 1)) {
FT_Done_Glyph(image);
if (tmpstr) {
gdFree(tmpstr);
}