From d9d30a7f38cf27452387d22d58d7736ae6db229f Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 6 Mar 2018 00:30:25 +0300 Subject: [PATCH] AST is not COPYABLE anymore and its reference-counter doesn't have to be initialized by 2. --- ext/opcache/zend_persist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index 132ecab1d0..74015112e5 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -330,7 +330,7 @@ static void zend_persist_zval(zval *z) Z_ARR_P(z) = zend_accel_memdup(Z_AST_P(z), sizeof(zend_ast_ref)); zend_persist_ast(GC_AST(old_ref)); Z_TYPE_FLAGS_P(z) = 0; - GC_SET_REFCOUNT(Z_COUNTED_P(z), 2); + GC_SET_REFCOUNT(Z_COUNTED_P(z), 1); efree(old_ref); } break; -- 2.50.1