From 8b61354b59e730f40d1d3cdd00ffe839e9ccc778 Mon Sep 17 00:00:00 2001 From: Florian Engelhardt Date: Mon, 21 Oct 2024 08:54:38 +0200 Subject: [PATCH] fix memleak (#327) --- src/scheduler.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scheduler.c b/src/scheduler.c index e02da5a..8ace372 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -218,7 +218,11 @@ static void php_parallel_scheduler_pull(zend_function *function) { } } +#if PHP_VERSION_ID < 80200 ZEND_MAP_PTR_NEW(function->op_array.run_time_cache); +#else + ZEND_MAP_PTR_INIT(function->op_array.run_time_cache, NULL); +#endif #if PHP_VERSION_ID >= 80100 if (function->op_array.num_dynamic_func_defs) {