From: Andi Gutmans Date: Sun, 25 Nov 2001 12:29:08 +0000 (+0000) Subject: - Fix crash and leak X-Git-Tag: ChangeLog~245 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d559f17cdc5aa00c02ab0d9c8fb0d5ae35911f5;p=php - Fix crash and leak --- diff --git a/Zend/zend.c b/Zend/zend.c index e7987873fc..6ca79e954c 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -252,6 +252,7 @@ static void register_standard_class(void) zend_standard_class_def.parent = NULL; zend_hash_init_ex(&zend_standard_class_def.default_properties, 0, NULL, ZVAL_PTR_DTOR, 1, 0); zend_hash_init_ex(&zend_standard_class_def.static_members, 0, NULL, ZVAL_PTR_DTOR, 1, 0); + zend_hash_init_ex(&zend_standard_class_def.class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0); zend_hash_init_ex(&zend_standard_class_def.function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1, 0); zend_standard_class_def.constructor = NULL; zend_standard_class_def.handle_function_call = NULL; diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 4b0002467c..41b43b156b 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -956,7 +956,6 @@ void zend_do_begin_class_member_function_call(znode *class_name, znode *function opline->op1 = *class_name; opline->op2 = *function_name; opline->extended_value = ZEND_MEMBER_FUNC_CALL; - zval_copy_ctor(&opline->op2.u.constant); zend_stack_push(&CG(function_call_stack), (void *) &ptr, sizeof(zend_function *)); }