]> granicus.if.org Git - php/commitdiff
- #40578, fix the 2nd race condition on shutdown when the cache is freed
authorPierre Joye <pajoye@php.net>
Fri, 23 Feb 2007 00:58:49 +0000 (00:58 +0000)
committerPierre Joye <pajoye@php.net>
Fri, 23 Feb 2007 00:58:49 +0000 (00:58 +0000)
NEWS
ext/gd/libgd/gdft.c

diff --git a/NEWS b/NEWS
index 1a18c5365f77d930e4391c2dfb2a69a5fb236fca..4fddb3d4a305eca342849cf7c7a9a35b40b42328 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ PHP                                                                        NEWS
 - Added --ri switch to CLI which allows to check extension information. (Marcus)
 - Added tidyNode::getParent() method (John, Nuno)
 - Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
-- Fixed bug #40578 (imagettftext() multithreading issue). (Tony)
+- Fixed bug #40578 (imagettftext() multithreading issue). (Tony, Pierre)
 - Fixed bug #40576 (double values are truncated to 6 decimal digits when 
   encoding). (Tony)
 - Fixed bug #40560 (DIR functions do not work on root UNC path). (Dmitry)
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);
        }
 }