summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2008-09-13 02:32:51 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2008-09-13 02:32:51 +0000
commit3d9876cdbef3ae7771feae5096f7adf786b4556d (patch)
tree6c97c6b045da4b979acf6da47f631617bc22d69d /ext/mbstring/php_mbregex.c
parent9ecffdccffa5503ab3eb62d942ac19b49b27e51c (diff)
downloadphp-git-3d9876cdbef3ae7771feae5096f7adf786b4556d.tar.gz
- 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 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;
}
/* }}} */