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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user