From 6a4057d932babe301f170ba9e7019cbb280913d2 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Sat, 13 Sep 2008 02:34:23 +0000 Subject: [PATCH] - 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(+) 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; } /* }}} */ -- 2.40.0