Fix #808, When RAQM is used, and it fails or no text processed, the glyph may be leaked
parent
6cc1e39e9f
commit
767699b9f4
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue