]> granicus.if.org Git - php/commitdiff
Fixed leaks. Other leaks are originated in libgd.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 23 Nov 2002 22:11:59 +0000 (22:11 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 23 Nov 2002 22:11:59 +0000 (22:11 +0000)
ext/gd/gd.c
ext/gd/php_gd.h

index f2bee0bd45938359246a2945e05a17f2a217c739..6984b351a0b3a1ca3051b8d2f09dacd8f83c3314 100644 (file)
@@ -320,7 +320,7 @@ zend_module_entry gd_module_entry = {
        PHP_MINIT(gd),
        NULL,
        NULL,
-       NULL,
+       PHP_RSHUTDOWN(gd),
        PHP_MINFO(gd),
        NO_VERSION_YET,
        STANDARD_MODULE_PROPERTIES
@@ -412,6 +412,17 @@ PHP_MINIT_FUNCTION(gd)
 }
 /* }}} */
 
+/* {{{ PHP_RSHUTDOWN_FUNCTION
+ */
+PHP_RSHUTDOWN_FUNCTION(gd)
+{
+#if HAVE_LIBGD20
+       gdFreeFontCache();
+#endif
+       return SUCCESS;
+}
+/* }}} */
+
 /* {{{ PHP_MINFO_FUNCTION
  */
 PHP_MINFO_FUNCTION(gd)
index b42a34da9ae780b5ae76fd9775190c87ab4d9072..0ac89c2a387cb252f68c9b0edc55892fbaebc217 100644 (file)
@@ -58,6 +58,7 @@ extern zend_module_entry gd_module_entry;
 PHP_MINFO_FUNCTION(gd);
 PHP_MINIT_FUNCTION(gd);
 PHP_MSHUTDOWN_FUNCTION(gd);
+PHP_RSHUTDOWN_FUNCTION(gd);
 
 PHP_FUNCTION(gd_info);
 PHP_FUNCTION(imagearc);