mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
MINOR: lua: reset pointer after use
After releasing the Lua environment, this patch set the only one pointer to the Lua stack to NULL. This prevents an accidental re-use.
This commit is contained in:
parent
fd50f0bcc8
commit
a7b536b53b
1 changed files with 1 additions and 0 deletions
|
|
@ -907,6 +907,7 @@ void hlua_ctx_destroy(struct hlua *lua)
|
|||
/* The thread is garbage collected by Lua. */
|
||||
luaL_unref(lua->T, LUA_REGISTRYINDEX, lua->Mref);
|
||||
luaL_unref(gL.T, LUA_REGISTRYINDEX, lua->Tref);
|
||||
lua->T = NULL;
|
||||
}
|
||||
|
||||
/* This function is used to restore the Lua context when a coroutine
|
||||
|
|
|
|||
Loading…
Reference in a new issue