summaryrefslogtreecommitdiff
path: root/src/gdft.c
diff options
context:
space:
mode:
authortabe <none@none>2009-11-01 14:16:26 +0900
committertabe <none@none>2009-11-01 14:16:26 +0900
commit4d808f89a7664019f2293936923c70aafb07520e (patch)
treecea5bc35059292a23767159726755c2429592ad7 /src/gdft.c
parentdc22c26eaf88ff4d569badc27fd98dda0ed1a64d (diff)
downloadlibgd-4d808f89a7664019f2293936923c70aafb07520e.tar.gz
Fixed a possible memory leak in case that FT_Glyph_To_Bitmap() fails
Diffstat (limited to 'src/gdft.c')
-rw-r--r--src/gdft.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gdft.c b/src/gdft.c
index 2cb2b0a..7896208 100644
--- a/src/gdft.c
+++ b/src/gdft.c
@@ -1348,6 +1348,7 @@ fprintf(stderr,"dpi=%d,%d metric_res=%d ptsize=%g\n",hdpi,vdpi,METRIC_RES,ptsize
err = FT_Glyph_To_Bitmap (&image, ft_render_mode_normal, 0, 1);
if (err)
{
+ FT_Done_Glyph(image);
if (tmpstr)
gdFree (tmpstr);
gdCacheDelete (tc_cache);