From 97828f31d0373f27e39eed7a4e235aac53ca5d76 Mon Sep 17 00:00:00 2001
From: maoyanping <maoyanping@xfusion.com>
Date: Thu, 17 Apr 2025 15:14:41 +0800
Subject: [PATCH] fix-CVE-2024-46981

---
 src/scripting.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/scripting.c b/src/scripting.c
index 153b942..47b988b 100644
--- a/src/scripting.c
+++ b/src/scripting.c
@@ -1116,6 +1116,7 @@ void scriptingInit(int setup) {
 void scriptingRelease(void) {
     dictRelease(server.lua_scripts);
     server.lua_scripts_mem = 0;
+    lua_gc(server.lua, LUA_GCCOLLECT, 0);
     lua_close(server.lua);
 }
 
-- 
2.33.0

