From 06c411b9ef61d6895a1ee6da7b13ca1db9d6ba0e Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Sun, 1 Nov 2009 05:04:35 +0000 Subject: [PATCH] Fixed a possible memory leak in case that FT_Glyph_To_Bitmap() fails --- ext/gd/libgd/gdft.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index ffac3ebf6b..ac2bf344ff 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -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); } -- 2.50.1