diff --git a/src/gdft.c b/src/gdft.c index 745110f..1a38bcd 100644 --- a/src/gdft.c +++ b/src/gdft.c @@ -1509,6 +1509,9 @@ BGD_DECLARE(char *) gdImageStringFTEx (gdImagePtr im, int *brect, int fg, const gdFree(text); gdCacheDelete (tc_cache); gdMutexUnlock (gdFontCacheMutex); + if (info) { + gdFree(info); + } return "Problem loading glyph"; } @@ -1524,6 +1527,9 @@ BGD_DECLARE(char *) gdImageStringFTEx (gdImagePtr im, int *brect, int fg, const gdFree(text); gdCacheDelete (tc_cache); gdMutexUnlock (gdFontCacheMutex); + if (info) { + gdFree(info); + } return "Problem rendering glyph"; } }