From e3d0c91dbbbaedce2cff7a43ab4e9bc3accfc669 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Wed, 6 Oct 1999 17:45:15 +0000 Subject: [PATCH] - Fixed memory leak with this pointer. It was somtimes initialized with refcount of 2 instead of 1. - Also fixed a place where object.ptr_ptr is set to pointing to a zval* instead of zval**. I don't think this is ever used so we might be able to remove it altogether. --- Zend/zend_execute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 6133ac6babd..204a8b1f95e 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1492,9 +1492,9 @@ do_fcall_common: *tmp = *object.ptr; zendi_zval_copy_ctor(*tmp); object.ptr = tmp; - *object.ptr_ptr = tmp; + object.ptr_ptr = &tmp; } - object.ptr->refcount = 1; + object.ptr->refcount = 0; object.ptr->is_ref = 1; } *this_ptr = object.ptr;