From: Pierre Joye Date: Fri, 23 Feb 2007 01:02:57 +0000 (+0000) Subject: - MFB: #40578, fix the 2nd race condition on shutdown when the cache is X-Git-Tag: RELEASE_1_0_1~180 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d437feb83026cbd60b540f8544dc1941741a4ab;p=php - MFB: #40578, fix the 2nd race condition on shutdown when the cache is freed --- diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index bf5bd04d12..25974528af 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -718,9 +718,10 @@ gdroundupdown (FT_F26Dot6 v1, int updown) void gdFontCacheShutdown() { if (fontCache) { - gdMutexShutdown(gdFontCacheMutex); + gdMutexLock(gdFontCacheMutex); gdCacheDelete(fontCache); fontCache = NULL; + gdMutexShutdown(gdFontCacheMutex); FT_Done_FreeType(library); } }