Skip to content

Commit 06c411b

Browse files
author
Takeshi Abe
committed
Fixed a possible memory leak in case that FT_Glyph_To_Bitmap() fails
1 parent a9d0ccc commit 06c411b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/gd/libgd/gdft.c

+1
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
10901090

10911091
if (render) {
10921092
if (image->format != ft_glyph_format_bitmap && FT_Glyph_To_Bitmap(&image, ft_render_mode_normal, 0, 1)) {
1093+
FT_Done_Glyph(image);
10931094
if (tmpstr) {
10941095
gdFree(tmpstr);
10951096
}

0 commit comments

Comments
 (0)