Explorar o código

Bug: Lua stack still active when closing a state

Roberto Ierusalimschy %!s(int64=3) %!d(string=hai) anos
pai
achega
1de95e97ef
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      lstate.c

+ 1 - 0
lstate.c

@@ -271,6 +271,7 @@ static void close_state (lua_State *L) {
   if (!completestate(g))  /* closing a partially built state? */
     luaC_freeallobjects(L);  /* just collect its objects */
   else {  /* closing a fully built state */
+    L->ci = &L->base_ci;  /* unwind CallInfo list */
     luaD_closeprotected(L, 1, LUA_OK);  /* close all upvalues */
     luaC_freeallobjects(L);  /* collect all objects */
     luai_userstateclose(L);