From: Moriyoshi Koizumi Date: Sat, 13 Sep 2008 02:34:23 +0000 (+0000) Subject: - MFH: Properly initialize/finalize the library. This plugs the leaks caused by X-Git-Tag: php-5.2.7RC1~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a4057d932babe301f170ba9e7019cbb280913d2;p=php - MFH: Properly initialize/finalize the library. This plugs the leaks caused by onig_new(). --- diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 0c6b9a97af..9cc02dccb6 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -66,6 +66,7 @@ void _php_mb_regex_globals_dtor(zend_mbstring_globals *pglobals TSRMLS_DC) /* {{{ PHP_MINIT_FUNCTION(mb_regex) */ PHP_MINIT_FUNCTION(mb_regex) { + onig_init(); return SUCCESS; } /* }}} */ @@ -73,6 +74,7 @@ PHP_MINIT_FUNCTION(mb_regex) /* {{{ PHP_MSHUTDOWN_FUNCTION(mb_regex) */ PHP_MSHUTDOWN_FUNCTION(mb_regex) { + onig_end(); return SUCCESS; } /* }}} */