cvs: ZendEngine2 / zend.c zend_opcode.c

From: Date: Fri, 18 Apr 2003 18:40:53 +0000
Subject: cvs: ZendEngine2 / zend.c zend_opcode.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1164@lists.php.net to get a copy of this message
sterling Fri Apr 18 14:40:53 2003 EDT Modified files: /ZendEngine2 zend.c zend_opcode.c Log: Patch by Marcus Börger to fix some memleaks Index: ZendEngine2/zend.c diff -u ZendEngine2/zend.c:1.223 ZendEngine2/zend.c:1.224 --- ZendEngine2/zend.c:1.223 Thu Apr 17 10:33:38 2003 +++ ZendEngine2/zend.c Fri Apr 18 14:40:53 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.223 2003/04/17 14:33:38 sebastian Exp $ */ +/* $Id: zend.c,v 1.224 2003/04/18 18:40:53 sterling Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -382,6 +382,10 @@ 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 @@ 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(); } Index: ZendEngine2/zend_opcode.c diff -u ZendEngine2/zend_opcode.c:1.88 ZendEngine2/zend_opcode.c:1.89 --- ZendEngine2/zend_opcode.c:1.88 Tue Apr 1 14:37:04 2003 +++ ZendEngine2/zend_opcode.c Fri Apr 18 14:40:53 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_opcode.c,v 1.88 2003/04/01 19:37:04 andrei Exp $ */ +/* $Id: zend_opcode.c,v 1.89 2003/04/18 18:40:53 sterling Exp $ */ #include <stdio.h> @@ -173,6 +173,12 @@ free(ce->static_members); zend_hash_destroy(&ce->constants_table); zend_hash_destroy(&ce->class_table); + if (ce->num_interfaces > 0) { + free(ce->interfaces); + } + if (ce->doc_comment) { + free(ce->doc_comment); + } free(ce); break; case ZEND_USER_NAMESPACE:

« previous php.zend-engine.cvs (#1164) next »