diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2008-09-13 02:33:15 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2008-09-13 02:33:15 +0000 |
commit | 8fe2cb8cedfe2d1e2f679caff9f63f6ad0f86dfa (patch) | |
tree | af1e8d81d970f2686b2b0ef79015950d31f13797 /ext/mbstring/php_mbregex.c | |
parent | b8e81fd0a78191f8eda1eb88fa3c07a996d0aec0 (diff) | |
download | php-git-8fe2cb8cedfe2d1e2f679caff9f63f6ad0f86dfa.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.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } /* }}} */ |