Fix #808, improve fix here, at this stage info is not null (deref earlier too)

master
Pierre Joye 2022-01-30 10:40:36 +07:00
parent 767699b9f4
commit 0d50039b14
1 changed files with 2 additions and 6 deletions

View File

@ -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";
}
}