cvs: php-src /ext/gd/libgd gdft.c
| From: | Nuno Lopes | Date: | Wed, 04 Apr 2007 14:26:04 +0000 |
| Subject: | cvs: php-src /ext/gd/libgd gdft.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-43716@lists.php.net to get a copy of this message | ||
nlopess Wed Apr 4 14:26:04 2007 UTC
Modified files:
/php-src/ext/gd/libgd gdft.c
Log:
MFB: fix race condition on font cache shutdown
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gdft.c?r1=1.43&r2=1.44&diff_format=u
Index: php-src/ext/gd/libgd/gdft.c
diff -u php-src/ext/gd/libgd/gdft.c:1.43 php-src/ext/gd/libgd/gdft.c:1.44
--- php-src/ext/gd/libgd/gdft.c:1.43 Wed Apr 4 00:44:38 2007
+++ php-src/ext/gd/libgd/gdft.c Wed Apr 4 14:26:04 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()