]> granicus.if.org Git - php/commitdiff
- Properly initialize/finalize the library. This plugs the leaks caused by
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 13 Sep 2008 02:32:51 +0000 (02:32 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 13 Sep 2008 02:32:51 +0000 (02:32 +0000)
  onig_new().

ext/mbstring/php_mbregex.c

index d98503e18c124cb56a6eaea56037b64b719a4a02..2efacdb077636fab3819150f883ca4c148c446d4 100644 (file)
@@ -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;
 }
 /* }}} */