1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 19:52:20 +02:00

fix race condition on font cache shutdown

This commit is contained in:
Nuno Lopes
2007-04-04 14:24:03 +00:00
parent 539be2cc81
commit 5833fc40dc

View File

@@ -715,13 +715,15 @@ gdroundupdown (FT_F26Dot6 v1, int updown)
void gdFontCacheShutdown()
{
gdMutexLock(gdFontCacheMutex);
if (fontCache) {
gdMutexLock(gdFontCacheMutex);
gdCacheDelete(fontCache);
fontCache = NULL;
gdMutexUnlock(gdFontCacheMutex);
FT_Done_FreeType(library);
}
gdMutexUnlock(gdFontCacheMutex);
}
void gdFreeFontCache()