summaryrefslogtreecommitdiff
path: root/ext/gd
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
commit94cb01177a4cb79ced4d56b8724254a1b9ed2304 (patch)
tree6aa75c453357159e08bd688b552d831837007899 /ext/gd
parentf7420d58da95b250205073a777cdcedf0e6e0035 (diff)
downloadphp-git-94cb01177a4cb79ced4d56b8724254a1b9ed2304.tar.gz
Fixed a possible memory leak in case that FT_Glyph_To_Bitmap() fails
Diffstat (limited to 'ext/gd')
-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);
}