]> granicus.if.org Git - php/commitdiff
- MFB: #40578, fix the 2nd race condition on shutdown when the cache is
authorPierre Joye <pajoye@php.net>
Fri, 23 Feb 2007 01:02:57 +0000 (01:02 +0000)
committerPierre Joye <pajoye@php.net>
Fri, 23 Feb 2007 01:02:57 +0000 (01:02 +0000)
  freed

ext/gd/libgd/gdft.c

index bf5bd04d12e6b56a2868de6f3304013ece09daa2..25974528af8d028da5fd9ae388636400777a5375 100644 (file)
@@ -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);
        }
 }