From 0d50039b141b0efb02f927a089ea18377fa50bca Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 30 Jan 2022 10:40:36 +0700 Subject: [PATCH] Fix #808, improve fix here, at this stage info is not null (deref earlier too) --- src/gdft.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gdft.c b/src/gdft.c index 1a38bcd..47a5cfc 100644 --- a/src/gdft.c +++ b/src/gdft.c @@ -1509,9 +1509,7 @@ BGD_DECLARE(char *) gdImageStringFTEx (gdImagePtr im, int *brect, int fg, const gdFree(text); gdCacheDelete (tc_cache); gdMutexUnlock (gdFontCacheMutex); - if (info) { - gdFree(info); - } + gdFree(info); return "Problem loading glyph"; } @@ -1527,9 +1525,7 @@ BGD_DECLARE(char *) gdImageStringFTEx (gdImagePtr im, int *brect, int fg, const gdFree(text); gdCacheDelete (tc_cache); gdMutexUnlock (gdFontCacheMutex); - if (info) { - gdFree(info); - } + gdFree(info); return "Problem rendering glyph"; } }