summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gdft.c
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@php.net>2009-11-01 05:04:35 +0000
committerTakeshi Abe <tabe@php.net>2009-11-01 05:04:35 +0000
commit06c411b9ef61d6895a1ee6da7b13ca1db9d6ba0e (patch)
tree8545a9b24ef4c468ba78627cbea363ec133d8d36 /ext/gd/libgd/gdft.c
parenta9d0ccc45997abf787ac93e9632c3b9541717df7 (diff)
downloadphp-git-06c411b9ef61d6895a1ee6da7b13ca1db9d6ba0e.tar.gz
Fixed a possible memory leak in case that FT_Glyph_To_Bitmap() fails
Diffstat (limited to 'ext/gd/libgd/gdft.c')
-rw-r--r--ext/gd/libgd/gdft.c1
1 files changed, 1 insertions, 0 deletions
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);
}