summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-10-08 23:52:24 +0300
committerDmitry Stogov <dmitry@zend.com>2018-10-08 23:52:24 +0300
commitca7ccd01e44cb24638b396f9c79d463f57a0194f (patch)
tree34c00337ca8f031855d30233c50cf9b6411ad5d0
parent8a5ababea2b56746c496318216aefd1a9d1f0a98 (diff)
downloadphp-git-ca7ccd01e44cb24638b396f9c79d463f57a0194f.tar.gz
During size calculation, pointer should be kept unchanged
-rw-r--r--ext/opcache/zend_persist_calc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c
index 66ca701e1e..fcd5db58a7 100644
--- a/ext/opcache/zend_persist_calc.c
+++ b/ext/opcache/zend_persist_calc.c
@@ -267,9 +267,7 @@ static void zend_persist_class_method_calc(zval *zv)
ZEND_ASSERT(op_array->type == ZEND_USER_FUNCTION);
old_op_array = zend_shared_alloc_get_xlat_entry(op_array);
- if (old_op_array) {
- Z_PTR_P(zv) = old_op_array;
- } else {
+ if (!old_op_array) {
ADD_ARENA_SIZE(sizeof(zend_op_array));
zend_persist_op_array_calc_ex(Z_PTR_P(zv));
zend_shared_alloc_register_xlat_entry(op_array, Z_PTR_P(zv));