Skip to content

Commit 1de95e9

Browse files
committed
Bug: Lua stack still active when closing a state
1 parent ad3942a commit 1de95e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lstate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ static void close_state (lua_State *L) {
271271
if (!completestate(g)) /* closing a partially built state? */
272272
luaC_freeallobjects(L); /* just collect its objects */
273273
else { /* closing a fully built state */
274+
L->ci = &L->base_ci; /* unwind CallInfo list */
274275
luaD_closeprotected(L, 1, LUA_OK); /* close all upvalues */
275276
luaC_freeallobjects(L); /* collect all objects */
276277
luai_userstateclose(L);

0 commit comments

Comments
 (0)