summaryrefslogtreecommitdiff
path: root/Zend/zend.c
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2003-04-18 18:40:53 +0000
committerSterling Hughes <sterling@php.net>2003-04-18 18:40:53 +0000
commit48b3303217198663254c3cf312a8521a08b1420d (patch)
treea67ca9bb1f344e0d4e8a91af13019ab27d44b55a /Zend/zend.c
parentbfaf618b08c188939cc174d4b73d5b83a5cf169a (diff)
downloadphp-git-48b3303217198663254c3cf312a8521a08b1420d.tar.gz
Patch by Marcus Börger to fix some memleaks
Diffstat (limited to 'Zend/zend.c')
-rw-r--r--Zend/zend.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index beb38d1a01..488aa3fa7a 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -382,6 +382,10 @@ static void register_standard_class(TSRMLS_D)
zend_hash_add(GLOBAL_CLASS_TABLE, "stdclass", sizeof("stdclass"), &zend_standard_class_def, sizeof(zend_class_entry *), NULL);
}
+static void unregister_standard_class()
+{
+ destroy_zend_class(&zend_standard_class_def);
+}
static void zend_set_default_compile_time_values(TSRMLS_D)
{
@@ -657,17 +661,19 @@ void zend_shutdown(TSRMLS_D)
zend_hash_graceful_reverse_destroy(&module_registry);
zend_destroy_rsrc_list_dtors();
-#ifndef ZTS
- /* In ZTS mode these are freed by compiler_globals_dtor() */
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
zend_hash_destroy(GLOBAL_CLASS_TABLE);
-#endif
zend_hash_destroy(GLOBAL_AUTO_GLOBALS_TABLE);
free(GLOBAL_AUTO_GLOBALS_TABLE);
zend_shutdown_extensions(TSRMLS_C);
free(zend_version_info);
+
zend_shutdown_constants(TSRMLS_C);
+#ifdef ZTS
+ zend_hash_destroy(GLOBAL_CONSTANTS_TABLE);
+#endif
+ unregister_standard_class();
}