diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-12-10 10:53:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-12-10 10:53:54 -0300 |
commit | 1de95e97ef65632a88e08b6184bd9d1ceba7ec2f (patch) | |
tree | aa9376fcefb5124e0743a91e9c9de13a1dd927c0 /lstate.c | |
parent | ad3942adba574c9d008c99ce2785a5af19d146bf (diff) | |
download | lua-1de95e97ef65632a88e08b6184bd9d1ceba7ec2f.tar.gz lua-1de95e97ef65632a88e08b6184bd9d1ceba7ec2f.tar.bz2 lua-1de95e97ef65632a88e08b6184bd9d1ceba7ec2f.zip |
Bug: Lua stack still active when closing a state
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -271,6 +271,7 @@ static void close_state (lua_State *L) { | |||
271 | if (!completestate(g)) /* closing a partially built state? */ | 271 | if (!completestate(g)) /* closing a partially built state? */ |
272 | luaC_freeallobjects(L); /* just collect its objects */ | 272 | luaC_freeallobjects(L); /* just collect its objects */ |
273 | else { /* closing a fully built state */ | 273 | else { /* closing a fully built state */ |
274 | L->ci = &L->base_ci; /* unwind CallInfo list */ | ||
274 | luaD_closeprotected(L, 1, LUA_OK); /* close all upvalues */ | 275 | luaD_closeprotected(L, 1, LUA_OK); /* close all upvalues */ |
275 | luaC_freeallobjects(L); /* collect all objects */ | 276 | luaC_freeallobjects(L); /* collect all objects */ |
276 | luai_userstateclose(L); | 277 | luai_userstateclose(L); |