]> granicus.if.org Git - php/commitdiff
fix #41075 (memleak when creating default object caused exception)
authorAntony Dovgal <tony2001@php.net>
Fri, 13 Apr 2007 14:39:34 +0000 (14:39 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 13 Apr 2007 14:39:34 +0000 (14:39 +0000)
Zend/zend_execute.c

index f867dd8f6cde8aa0d7400278aa4d4e1c782d489e..901385e56f76fdcfa72463ba32a23c22ec2388f7 100644 (file)
@@ -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);