From 8fe2cb8cedfe2d1e2f679caff9f63f6ad0f86dfa Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Sat, 13 Sep 2008 02:33:15 +0000 Subject: - MFH: Properly initialize/finalize the library. This plugs the leaks caused by onig_new(). --- ext/mbstring/php_mbregex.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/mbstring/php_mbregex.c') diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 0e541f6b41..64af88b6b4 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; } /* }}} */ -- cgit v1.2.1