diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-07-22 23:16:50 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-07-22 23:16:50 +0200 |
commit | 531fa70ba843895270a795acebaebca143704abb (patch) | |
tree | 670e99cfe4e2411402776d590ef0d8fc95705cfb | |
parent | 3cc02533ae2022aa987ddf4cd372afbb472e4e91 (diff) | |
download | php-git-531fa70ba843895270a795acebaebca143704abb.tar.gz |
Opcache is assuming that op_arrays without refcount are always efree()d
We maybe should search for some other way, because just not refcounting the op_array is rather a dirty hack.
If possible, we should change opcache and just expect op_array->refcount != NULL ... but I have not found a clean way yet.
-rw-r--r-- | Zend/zend_opcode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index b0242c800e..90afc6a985 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -352,7 +352,11 @@ ZEND_API zend_bool destroy_op_array(zend_op_array *op_array) efree(op_array->run_time_cache); } - if (!op_array->refcount || --(*op_array->refcount) > 0) { + if (!op_array->refcount) { + return 1; + } + + if (--(*op_array->refcount) > 0) { return 0; } |