From: Thierry FOURNIER Date: Thu, 5 Mar 2015 16:10:14 +0000 (+0100) Subject: BUG/MEDIUM: lua: reset flags before resuming execution X-Git-Tag: v1.6-dev1~60 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bfc09b4cff4216604c2bf333f7b0004d51591eb;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: lua: reset flags before resuming execution This patch reset the flags except th run flag before resuming the Lua execution. If this initialisation is not done, some flags can remain at the end of the Lua execution and give bad informations. --- diff --git a/src/hlua.c b/src/hlua.c index cc88bd1a59..b929146764 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -685,6 +685,9 @@ resume_execution: */ lua_sethook(lua->T, hlua_hook, LUA_MASKCOUNT, hlua_nb_instruction); + /* Remove all flags except the running flags. */ + lua->flags = HLUA_RUN; + /* Call the function. */ ret = lua_resume(lua->T, gL.T, lua->nargs); switch (ret) {