From: Pierre Joye Date: Fri, 23 Feb 2007 00:58:49 +0000 (+0000) Subject: - #40578, fix the 2nd race condition on shutdown when the cache is freed X-Git-Tag: php-5.2.2RC1~317 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5e6c78edadd216edd1d80ac9acd273fe3e13340;p=php - #40578, fix the 2nd race condition on shutdown when the cache is freed --- diff --git a/NEWS b/NEWS index 1a18c5365f..4fddb3d4a3 100644 --- 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) 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); } }