From: Thierry FOURNIER Date: Fri, 28 Aug 2015 07:54:13 +0000 (+0200) Subject: BUG/MEDIUM: lua: cannot process more Lua hooks after a "done()" function call X-Git-Tag: v1.6-dev4~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1587b331401e66e97fd6659dd8d938b58998752;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: lua: cannot process more Lua hooks after a "done()" function call When the Lua execution flow endswith the command done (core.done or txn.done()) an error is detourned, and the stack is no longer usable. This patch juste reinitilize the stack if this case is detected. --- diff --git a/src/hlua.c b/src/hlua.c index e98a28d120..2def3d47f7 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -1000,6 +1000,7 @@ timeout_reached: */ if (lua->flags & HLUA_EXIT) { ret = HLUA_E_OK; + hlua_ctx_renew(lua, 0); break; }