summaryrefslogtreecommitdiff
path: root/Zend/zend_opcode.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-07-22 23:16:50 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-07-22 23:16:50 +0200
commit531fa70ba843895270a795acebaebca143704abb (patch)
tree670e99cfe4e2411402776d590ef0d8fc95705cfb /Zend/zend_opcode.c
parent3cc02533ae2022aa987ddf4cd372afbb472e4e91 (diff)
downloadphp-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.
Diffstat (limited to 'Zend/zend_opcode.c')
-rw-r--r--Zend/zend_opcode.c6
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;
}