summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pierre.php@gmail.com>2022-01-29 21:03:29 +0700
committerGitHub <noreply@github.com>2022-01-29 21:03:29 +0700
commit6bbeba447b2eb35af23ee0ba28c0c79f1aa4617b (patch)
tree1c8471c665385988834ba3d80e9dc61094c42b33
parent2f76f48837dfa53b21aa8b492bb5b725a6f8e831 (diff)
downloadlibgd-6bbeba447b2eb35af23ee0ba28c0c79f1aa4617b.tar.gz
Fix #808, When RAQM is used, and it fails or no text processed, the glyph may be leaked (#809)
-rw-r--r--src/gdft.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gdft.c b/src/gdft.c
index acffdee..745110f 100644
--- a/src/gdft.c
+++ b/src/gdft.c
@@ -1391,6 +1391,9 @@ BGD_DECLARE(char *) gdImageStringFTEx (gdImagePtr im, int *brect, int fg, const
gdFree (tmpstr);
gdCacheDelete (tc_cache);
gdMutexUnlock (gdFontCacheMutex);
+ if (info) {
+ gdFree(info);
+ }
return "Problem doing text layout";
}