]> granicus.if.org Git - php/commitdiff
- Move finalization code to the proper place
authorMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 1 Aug 2008 22:53:20 +0000 (22:53 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 1 Aug 2008 22:53:20 +0000 (22:53 +0000)
ext/mbstring/mbstring.c

index d657dba5ca52a09130d4fa9a63e9588f55c73d66..deff1e0e3e2df0e1d5f1e98e120dea23111e6936 100644 (file)
@@ -821,6 +821,18 @@ static PHP_GINIT_FUNCTION(mbstring)
 /* {{{ PHP_GSHUTDOWN_FUNCTION */
 static PHP_GSHUTDOWN_FUNCTION(mbstring)
 {
+       if (mbstring_globals->http_input_list) {
+               free(mbstring_globals->http_input_list);
+       }
+#ifdef ZEND_MULTIBYTE
+       if (mbstring_globals->script_encoding_list) {
+               free(mbstring_globals->script_encoding_list);
+       }
+#endif /* ZEND_MULTIBYTE */
+       if (mbstring_globals->detect_order_list) {
+               free(mbstring_globals->detect_order_list);
+       }
+
 #if HAVE_MBREGEX
        _php_mb_regex_globals_dtor(mbstring_globals TSRMLS_CC);
 #endif
@@ -859,18 +871,6 @@ PHP_MSHUTDOWN_FUNCTION(mbstring)
 {
        UNREGISTER_INI_ENTRIES();
        
-       if (MBSTRG(http_input_list)) {
-               free(MBSTRG(http_input_list));
-       }
-#ifdef ZEND_MULTIBYTE
-       if (MBSTRG(script_encoding_list)) {
-               free(MBSTRG(script_encoding_list));
-       }
-#endif /* ZEND_MULTIBYTE */
-       if (MBSTRG(detect_order_list)) {
-               free(MBSTRG(detect_order_list));
-       }
-
 #if HAVE_MBREGEX
        PHP_MSHUTDOWN(mb_regex) (INIT_FUNC_ARGS_PASSTHRU);
 #endif