From: Moriyoshi Koizumi Date: Sat, 13 Sep 2008 02:32:51 +0000 (+0000) Subject: - Properly initialize/finalize the library. This plugs the leaks caused by X-Git-Tag: BEFORE_HEAD_NS_CHANGE~404 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d9876cdbef3ae7771feae5096f7adf786b4556d;p=php - 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 d98503e18c..2efacdb077 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -114,6 +114,7 @@ void php_mb_regex_globals_free(zend_mb_regex_globals *pglobals TSRMLS_DC) /* {{{ PHP_MINIT_FUNCTION(mb_regex) */ PHP_MINIT_FUNCTION(mb_regex) { + onig_init(); return SUCCESS; } /* }}} */ @@ -121,6 +122,7 @@ PHP_MINIT_FUNCTION(mb_regex) /* {{{ PHP_MSHUTDOWN_FUNCTION(mb_regex) */ PHP_MSHUTDOWN_FUNCTION(mb_regex) { + onig_end(); return SUCCESS; } /* }}} */