cvs: Zend(PHP_4_3) / zend.c
| From: | Jani Taskinen | Date: | Mon, 23 Feb 2004 19:25:07 +0000 |
| Subject: | cvs: Zend(PHP_4_3) / zend.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2395@lists.php.net to get a copy of this message | ||
sniper Mon Feb 23 14:25:07 2004 EDT
Modified files: (Branch: PHP_4_3)
/Zend zend.c
Log:
Fix memleak during shutdown (ZTS), kill compile warning
http://cvs.php.net/diff.php/Zend/zend.c?r1=1.162.2.15&r2=1.162.2.16&ty=u
Index: Zend/zend.c
diff -u Zend/zend.c:1.162.2.15 Zend/zend.c:1.162.2.16
--- Zend/zend.c:1.162.2.15 Tue Jan 13 04:13:45 2004
+++ Zend/zend.c Mon Feb 23 14:25:06 2004
@@ -375,18 +375,17 @@
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP TSRMLS_CC);
}
-#endif
-
-static void alloc_globals_ctor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
+static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
{
- start_memory_manager(TSRMLS_C);
+ shutdown_memory_manager(0, 1 TSRMLS_CC);
}
+#endif
-static void alloc_globals_dtor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
+static void alloc_globals_ctor(zend_alloc_globals *alloc_globals_p TSRMLS_DC)
{
- shutdown_memory_manager(0, 1 TSRMLS_CC);
+ start_memory_manager(TSRMLS_C);
}
@@ -566,6 +565,9 @@
free(zend_version_info);
#ifndef ZTS
zend_shutdown_constants();
+#else
+ zend_hash_destroy(GLOBAL_CONSTANTS_TABLE);
+ free(GLOBAL_CONSTANTS_TABLE);
#endif
}