summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pierre.php@gmail.com>2022-01-30 10:40:36 +0700
committerPierre Joye <pierre.php@gmail.com>2022-01-30 10:40:36 +0700
commit0d50039b141b0efb02f927a089ea18377fa50bca (patch)
tree8c9551d9a0bf44a58fdaa73e5aae76ce877dacac
parent767699b9f4911ee5cd488c035cb4c1033ef5cf40 (diff)
downloadlibgd-0d50039b141b0efb02f927a089ea18377fa50bca.tar.gz
Fix #808, improve fix here, at this stage info is not null (deref earlier too)
-rw-r--r--src/gdft.c8
1 files 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";
}
}