From: Andi Gutmans <andi@php.net> Date: Sun, 10 Oct 1999 18:31:42 +0000 (+0000) Subject: - Didn't lower refcount when doing an internal function call linked to a regular... X-Git-Tag: php-4.0b3_RC2~215 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a88d5a68e095e5af4c27d22311e2ea92c426190;p=php - Didn't lower refcount when doing an internal function call linked to a regular object. --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 902d75b689..97861d0299 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1463,7 +1463,10 @@ do_fcall_common: zend_ptr_stack_push(&EG(argument_stack), (void *) opline->extended_value); if (function_state.function->type==ZEND_INTERNAL_FUNCTION) { var_uninit(&Ts[opline->result.u.var].tmp_var); - ((zend_internal_function *) function_state.function)->handler(opline->extended_value, &Ts[opline->result.u.var].tmp_var, &EG(regular_list), &EG(persistent_list), (object.ptr?object.ptr:NULL)); + ((zend_internal_function *) function_state.function)->handler(opline->extended_value, &Ts[opline->result.u.var].tmp_var, &EG(regular_list), &EG(persistent_list), object.ptr); + if (object.ptr) { + object.ptr->refcount--; + } } else if (function_state.function->type==ZEND_USER_FUNCTION) { HashTable *calling_symbol_table;