From: Moriyoshi Koizumi Date: Sat, 23 Nov 2002 22:11:59 +0000 (+0000) Subject: Fixed leaks. Other leaks are originated in libgd. X-Git-Tag: RELEASE_1_0b2~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4124672edfa44dc5585122fd2ef9650817206e14;p=php Fixed leaks. Other leaks are originated in libgd. --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index f2bee0bd45..6984b351a0 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -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) diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index b42a34da9a..0ac89c2a38 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -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);