summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2003-04-30 16:23:59 +0000
committerRasmus Lerdorf <rasmus@php.net>2003-04-30 16:23:59 +0000
commitf183abfd6aee2265f1fc25048b3a18e50abe3714 (patch)
tree9c99ae5caf071dbf6941b1e3f97d0118b3c2cadd
parentc3a1a51f83834f9357471f7cd4863ba3c9097a5b (diff)
downloadphp-git-f183abfd6aee2265f1fc25048b3a18e50abe3714.tar.gz
Fix gdCacheDelete() crashes in the bundled gd library
-rw-r--r--ext/gd/libgd/gdft.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c
index f196a980fb..d978c75ec1 100644
--- a/ext/gd/libgd/gdft.c
+++ b/ext/gd/libgd/gdft.c
@@ -744,7 +744,7 @@ extern int any2eucjp (char *, char *, unsigned int);
/* Persistent font cache until explicitly cleared */
/* Fonts can be used across multiple images */
-static gdCache_head_t *fontCache;
+static gdCache_head_t *fontCache = NULL;
static FT_Library library;
void
@@ -753,6 +753,7 @@ gdFreeFontCache()
if (fontCache)
{
gdCacheDelete(fontCache);
+ fontCache=NULL;
FT_Done_FreeType(library);
}
}