8050c84
diff -up lua-5.4.3/src/lstate.c.CVE-2021-44647 lua-5.4.3/src/lstate.c
8050c84
--- lua-5.4.3/src/lstate.c.CVE-2021-44647	2022-01-24 11:15:00.851544455 -0500
8050c84
+++ lua-5.4.3/src/lstate.c	2022-01-24 11:15:27.187694727 -0500
8050c84
@@ -271,6 +271,7 @@ static void close_state (lua_State *L) {
8050c84
   if (!completestate(g))  /* closing a partially built state? */
8050c84
     luaC_freeallobjects(L);  /* jucst collect its objects */
8050c84
   else {  /* closing a fully built state */
8050c84
+    L->ci = &L->base_ci;  /* unwind CallInfo list */
8050c84
     luaD_closeprotected(L, 1, LUA_OK);  /* close all upvalues */
8050c84
     luaC_freeallobjects(L);  /* collect all objects */
8050c84
     luai_userstateclose(L);