summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2010-04-20 12:30:35 (GMT)
committerDmitry Stogov <dmitry@php.net>2010-04-20 12:30:35 (GMT)
commitb6ae8a964bf08702f0726bcb90fb4831c588c006 (patch)
tree342f2e4a20b31e3e7fc0297679f0e78ca5cfe56c /Zend
parentf507cc9cf692f01428555adb280049f73a8ae573 (diff)
downloadphp-b6ae8a964bf08702f0726bcb90fb4831c588c006.tar.gz
Fixed bug #48781 (Cyclical garbage collector memory leak)
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend_execute.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index d4c9234..ba74488 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -848,6 +848,7 @@ static inline zval* zend_assign_tmp_to_variable(zval **variable_ptr_ptr, zval *v
zendi_zval_dtor(garbage);
return variable_ptr;
} else { /* we need to split */
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr);
ALLOC_ZVAL(variable_ptr);
INIT_PZVAL_COPY(variable_ptr, value);
*variable_ptr_ptr = variable_ptr;
@@ -901,6 +902,7 @@ static inline zval* zend_assign_to_variable(zval **variable_ptr_ptr, zval *value
return value;
}
} else { /* we need to split */
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr);
if (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0) {
ALLOC_ZVAL(variable_ptr);
INIT_PZVAL_COPY(variable_ptr, value);