mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-21 13:03:37 +02: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:
committed by
Willy Tarreau
parent
fd50f0bcc8
commit
a7b536b53b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user