Bug: Lua stack still active when closing a state
This commit is contained in:
1 parent
ad3942adba
commit
1de95e97ef
1 file changed
+1
@@ -271,6 +271,7 @@ static void close_state (lua_State *L) {
|
|||||||
if (!completestate(g)) /* closing a partially built state? */
|
if (!completestate(g)) /* closing a partially built state? */
|
||||||
luaC_freeallobjects(L); /* just collect its objects */
|
luaC_freeallobjects(L); /* just collect its objects */
|
||||||
else { /* closing a fully built state */
|
else { /* closing a fully built state */
|
||||||
|
L->ci = &L->base_ci; /* unwind CallInfo list */
|
||||||
luaD_closeprotected(L, 1, LUA_OK); /* close all upvalues */
|
luaD_closeprotected(L, 1, LUA_OK); /* close all upvalues */
|
||||||
luaC_freeallobjects(L); /* collect all objects */
|
luaC_freeallobjects(L); /* collect all objects */
|
||||||
luai_userstateclose(L);
|
luai_userstateclose(L);
|
||||||
|
|||||||
Reference in new issue
Block a user