mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +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:
parent
fd50f0bcc8
commit
a7b536b53b
@ -907,6 +907,7 @@ void hlua_ctx_destroy(struct hlua *lua)
|
|||||||
/* The thread is garbage collected by Lua. */
|
/* The thread is garbage collected by Lua. */
|
||||||
luaL_unref(lua->T, LUA_REGISTRYINDEX, lua->Mref);
|
luaL_unref(lua->T, LUA_REGISTRYINDEX, lua->Mref);
|
||||||
luaL_unref(gL.T, LUA_REGISTRYINDEX, lua->Tref);
|
luaL_unref(gL.T, LUA_REGISTRYINDEX, lua->Tref);
|
||||||
|
lua->T = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function is used to restore the Lua context when a coroutine
|
/* This function is used to restore the Lua context when a coroutine
|
||||||
|
Loading…
x
Reference in New Issue
Block a user