summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-04-13 14:39:34 +0000
committerAntony Dovgal <tony2001@php.net>2007-04-13 14:39:34 +0000
commit3002349e557c5145fce0fefc3651b2ecd496c887 (patch)
tree7d5d57f4dff3c65f7adf16e27e53267af2e38931
parenta843b46454bfd263934034eea09e3f37600ae52d (diff)
downloadphp-git-3002349e557c5145fce0fefc3651b2ecd496c887.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 f867dd8f6c..901385e56f 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -614,7 +614,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);