Browse Source

- Fix leak when global is used in the global scope.

experimetnal/RETURN_REF_PATCH
Andi Gutmans 27 years ago
parent
commit
2c88f2950c
  1. 3
      Zend/zend_execute_API.c

3
Zend/zend_execute_API.c

@ -470,7 +470,8 @@ ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **var
value_ptr = *value_ptr_ptr;
if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
} else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) {
// } else if (variable_ptr==&EG(uninitialized_zval) || variable_ptr!=value_ptr) {
} else if (variable_ptr != value_ptr) {
variable_ptr->refcount--;
if (variable_ptr->refcount==0) {
zendi_zval_dtor(*variable_ptr);

Loading…
Cancel
Save