pajoye          Fri Feb 23 01:02:57 2007 UTC

  Modified files:              
    /php-src/ext/gd/libgd       gdft.c 
  Log:
  - MFB: #40578, fix the 2nd race condition on shutdown when the cache is 
    freed
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gdft.c?r1=1.39&r2=1.40&diff_format=u
Index: php-src/ext/gd/libgd/gdft.c
diff -u php-src/ext/gd/libgd/gdft.c:1.39 php-src/ext/gd/libgd/gdft.c:1.40
--- php-src/ext/gd/libgd/gdft.c:1.39    Wed Feb 21 14:59:36 2007
+++ php-src/ext/gd/libgd/gdft.c Fri Feb 23 01:02:57 2007
@@ -718,9 +718,10 @@
 void gdFontCacheShutdown()
 {
        if (fontCache) {
-               gdMutexShutdown(gdFontCacheMutex);
+               gdMutexLock(gdFontCacheMutex);
                gdCacheDelete(fontCache);
                fontCache = NULL;
+               gdMutexShutdown(gdFontCacheMutex);
                FT_Done_FreeType(library);
        }
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to