]> 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:41:36 +0000 (14:41 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 13 Apr 2007 14:41:36 +0000 (14:41 +0000)
Zend/zend_execute.c

index caa0aac2ac577f6e3e9a88ac3dcb8efd1c21e0c8..86239fa44ab9d4152f60d86ccc25d7dbdcd717b5 100644 (file)
@@ -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);