From bb0def99a8da652fe36ed7c600dd9773a54a2f98 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Fri, 13 Apr 2007 14:41:36 +0000 Subject: [PATCH] fix #41075 (memleak when creating default object caused exception) --- Zend/zend_execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index caa0aac2ac..86239fa44a 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -611,7 +611,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode Z_OBJ_HT_P(object)->write_dimension(object, property_name, value TSRMLS_CC); } - if (result && !RETURN_VALUE_UNUSED(result)) { + if (result && !RETURN_VALUE_UNUSED(result) && !EG(exception)) { T(result->u.var).var.ptr = value; T(result->u.var).var.ptr_ptr = &T(result->u.var).var.ptr; /* this is so that we could use it in FETCH_DIM_R, etc. - see bug #27876 */ PZVAL_LOCK(value); -- 2.50.1