diff --git a/src/eval.c b/src/eval.c index 76085589cd..8d36e28326 100644 --- a/src/eval.c +++ b/src/eval.c @@ -282,6 +282,7 @@ void scriptingInit(int setup) { void freeLuaScriptsSync(dict *lua_scripts, list *lua_scripts_lru_list, lua_State *lua) { dictRelease(lua_scripts); listRelease(lua_scripts_lru_list); + lua_gc(lctx.lua, LUA_GCCOLLECT, 0); lua_close(lua); #if !defined(USE_LIBC)