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.
diff --git a/src/hlua.c b/src/hlua.c
index ceeeace..966ed5a 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -907,6 +907,7 @@
/* 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