diff options
author | Pierre Joye <pierre.php@gmail.com> | 2022-01-30 09:33:07 +0700 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2022-01-30 09:33:07 +0700 |
commit | 767699b9f4911ee5cd488c035cb4c1033ef5cf40 (patch) | |
tree | 1f47810b46c8e7dd0a4cd69557f617110ca7a710 | |
parent | 6cc1e39e9fddd15ae74adb1a09fcd5740f44923e (diff) | |
download | libgd-767699b9f4911ee5cd488c035cb4c1033ef5cf40.tar.gz |
Fix #808, When RAQM is used, and it fails or no text processed, the glyph may be leaked
-rw-r--r-- | src/gdft.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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"; } } |