mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 18:28:30 +00:00
Fix memory deallocation while yielding in redbean. (#384)
The yielded coroutine was removed from the stack too early, leaving it not being anchored, which led to memory freed prematurely.
This commit is contained in:
parent
fb7e8ef1e6
commit
233144b19d
3 changed files with 6 additions and 4 deletions
|
@ -13,7 +13,6 @@ COSMOPOLITAN_C_START_
|
|||
char *s = LuaFormatStack(L); \
|
||||
WARNF("lua stack should be empty!\n%s", s); \
|
||||
free(s); \
|
||||
lua_settop(L, 0); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue