summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2008-09-13 02:34:23 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2008-09-13 02:34:23 +0000
commit6a4057d932babe301f170ba9e7019cbb280913d2 (patch)
tree5919d933a43c08bcde0586eb3ea0ae1ca19c1307 /ext/mbstring/php_mbregex.c
parenta86756745c9820ae0e1dccc314527da56ed14f5e (diff)
downloadphp-git-6a4057d932babe301f170ba9e7019cbb280913d2.tar.gz
- MFH: Properly initialize/finalize the library. This plugs the leaks caused by
onig_new().
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c2
1 files changed, 2 insertions, 0 deletions
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;
}
/* }}} */