summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/gd/gd.c13
-rw-r--r--ext/gd/php_gd.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 266062856a..943bdeb0df 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -995,7 +995,7 @@ zend_module_entry gd_module_entry = {
"gd",
gd_functions,
PHP_MINIT(gd),
- NULL,
+ PHP_MSHUTDOWN(gd),
NULL,
#if HAVE_GD_FREETYPE && HAVE_LIBFREETYPE
PHP_RSHUTDOWN(gd),
@@ -1204,6 +1204,17 @@ PHP_MINIT_FUNCTION(gd)
}
/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
+PHP_MSHUTDOWN_FUNCTION(gd)
+{
+#if HAVE_GD_BUNDLED && HAVE_LIBFREETYPE
+ gdFontCacheMutexShutdown();
+#endif
+ return SUCCESS;
+}
+/* }}} */
+
/* {{{ PHP_RSHUTDOWN_FUNCTION
*/
#if HAVE_GD_FREETYPE && HAVE_LIBFREETYPE
diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h
index 04652b7bc1..2b11364753 100644
--- a/ext/gd/php_gd.h
+++ b/ext/gd/php_gd.h
@@ -83,6 +83,7 @@ extern zend_module_entry gd_module_entry;
/* gd.c functions */
PHP_MINFO_FUNCTION(gd);
PHP_MINIT_FUNCTION(gd);
+PHP_MSHUTDOWN_FUNCTION(gd);
#if HAVE_GD_FREETYPE && HAVE_LIBFREETYPE
PHP_RSHUTDOWN_FUNCTION(gd);
#endif