diff options
| author | Bob Weinand <bobwei9@hotmail.com> | 2015-07-22 17:15:09 +0200 |
|---|---|---|
| committer | Bob Weinand <bobwei9@hotmail.com> | 2015-07-22 17:16:16 +0200 |
| commit | b6936adb58288a0606ed847802d9226cddb41e2b (patch) | |
| tree | 49134e278b38a2629cb66bfffcce7fb4c7b94b5d /Zend/zend_opcode.c | |
| parent | 3e479ef424b2193f41a28fda18bde076a79ea71e (diff) | |
| download | php-git-b6936adb58288a0606ed847802d9226cddb41e2b.tar.gz | |
We cannot safely assume that all op array will be refcount 0 after execution
Some extensions may want to analyze or re-run the op array later
Diffstat (limited to 'Zend/zend_opcode.c')
| -rw-r--r-- | Zend/zend_opcode.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 62869373dd..b0242c800e 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -335,7 +335,7 @@ void zend_class_add_ref(zval *zv) ce->refcount++; } -ZEND_API void destroy_op_array(zend_op_array *op_array) +ZEND_API zend_bool destroy_op_array(zend_op_array *op_array) { zval *literal = op_array->literals; zval *end; @@ -352,8 +352,8 @@ ZEND_API void destroy_op_array(zend_op_array *op_array) efree(op_array->run_time_cache); } - if (!op_array->refcount || --(*op_array->refcount)>0) { - return; + if (!op_array->refcount || --(*op_array->refcount) > 0) { + return 0; } efree_size(op_array->refcount, sizeof(*(op_array->refcount))); @@ -414,6 +414,8 @@ ZEND_API void destroy_op_array(zend_op_array *op_array) } efree(arg_info); } + + return 1; } void init_op(zend_op *op) |
