mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- MFH Fix refcounting
This commit is contained in:
parent
0e131653c1
commit
b7bb8034b5
2 changed files with 50 additions and 0 deletions
|
@ -124,7 +124,13 @@ ZEND_API zval* zend_closure_copy(zval *closure_obj, zval *this_ptr TSRMLS_DC) /*
|
|||
|
||||
zval_copy_ctor(closure_obj);
|
||||
closure = (zend_closure *)zend_object_store_get_object(closure_obj TSRMLS_CC);
|
||||
if (closure->this_ptr) {
|
||||
zval_ptr_dtor(&closure->this_ptr);
|
||||
}
|
||||
closure->this_ptr = this_ptr;
|
||||
if (this_ptr) {
|
||||
Z_ADDREF_P(this_ptr);
|
||||
}
|
||||
return closure_obj;
|
||||
}
|
||||
/* }}} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue