nlopess Wed Apr 4 14:24:03 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/gd/libgd gdft.c Log: fix race condition on font cache shutdown http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gdft.c?r1=1.36.4.7&r2=1.36.4.8&diff_format=u Index: php-src/ext/gd/libgd/gdft.c diff -u php-src/ext/gd/libgd/gdft.c:1.36.4.7 php-src/ext/gd/libgd/gdft.c:1.36.4.8 --- php-src/ext/gd/libgd/gdft.c:1.36.4.7 Wed Apr 4 00:47:55 2007 +++ php-src/ext/gd/libgd/gdft.c Wed Apr 4 14:24:03 2007 @@ -715,13 +715,15 @@ void gdFontCacheShutdown() { + gdMutexLock(gdFontCacheMutex); + if (fontCache) { - gdMutexLock(gdFontCacheMutex); gdCacheDelete(fontCache); fontCache = NULL; - gdMutexUnlock(gdFontCacheMutex); FT_Done_FreeType(library); } + + gdMutexUnlock(gdFontCacheMutex); } void gdFreeFontCache()
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php