Skip to content

Commit ca7ccd0

Browse files
committed
During size calculation, pointer should be kept unchanged
1 parent 8a5abab commit ca7ccd0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/opcache/zend_persist_calc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,7 @@ static void zend_persist_class_method_calc(zval *zv)
267267

268268
ZEND_ASSERT(op_array->type == ZEND_USER_FUNCTION);
269269
old_op_array = zend_shared_alloc_get_xlat_entry(op_array);
270-
if (old_op_array) {
271-
Z_PTR_P(zv) = old_op_array;
272-
} else {
270+
if (!old_op_array) {
273271
ADD_ARENA_SIZE(sizeof(zend_op_array));
274272
zend_persist_op_array_calc_ex(Z_PTR_P(zv));
275273
zend_shared_alloc_register_xlat_entry(op_array, Z_PTR_P(zv));

0 commit comments

Comments
 (0)