summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-04-13 14:41:36 +0000
committerAntony Dovgal <tony2001@php.net>2007-04-13 14:41:36 +0000
commitbb0def99a8da652fe36ed7c600dd9773a54a2f98 (patch)
tree48ab63075b8cad0189413c7ae36ca95f44a6cfef
parent35d5a196bd2f2ae936ab9c1bcecda2284c9cb47d (diff)
downloadphp-git-bb0def99a8da652fe36ed7c600dd9773a54a2f98.tar.gz
fix #41075 (memleak when creating default object caused exception)
-rw-r--r--Zend/zend_execute.c2
1 files changed, 1 insertions, 1 deletions
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);