From f26c4fa0ea7d0570ebe75db84c6bd366a7e45677 Mon Sep 17 00:00:00 2001 From: dongzitai Date: Fri, 25 Aug 2023 11:08:35 +0800 Subject: [PATCH] Fix memory leaks in SWOOLE_BASE mode --- ext-src/swoole_server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext-src/swoole_server.cc b/ext-src/swoole_server.cc index dda63689b5e..a1edd9fafff 100644 --- a/ext-src/swoole_server.cc +++ b/ext-src/swoole_server.cc @@ -207,7 +207,7 @@ static void server_free_object(zend_object *object) { delete property; zend_object_std_dtor(object); - if (serv && serv->is_master()) { + if (serv && ((serv->is_process_mode() && serv->is_master()) || serv->is_base_mode())) { delete serv; } }