lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 1de95e97ef65632a88e08b6184bd9d1ceba7ec2f
parent ad3942adba574c9d008c99ce2785a5af19d146bf
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Fri, 10 Dec 2021 10:53:27 -0300

Bug: Lua stack still active when closing a state

Diffstat:
Mlstate.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/lstate.c b/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);