moriyoshi               Fri Aug  1 22:53:21 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/mbstring       mbstring.c 
  Log:
  - Move finalization code to the proper place
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.33&r2=1.224.2.22.2.34&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.33 
php-src/ext/mbstring/mbstring.c:1.224.2.22.2.34
--- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.33     Sun Jul 13 01:36:15 2008
+++ php-src/ext/mbstring/mbstring.c     Fri Aug  1 22:53:20 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mbstring.c,v 1.224.2.22.2.33 2008/07/13 01:36:15 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.224.2.22.2.34 2008/08/01 22:53:20 moriyoshi Exp $ */
 
 /*
  * PHP 4 Multibyte String module "mbstring"
@@ -821,6 +821,18 @@
 /* {{{ 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 @@
 {
        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



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to