]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: lua: control executed twice
authorThierry FOURNIER / OZON.IO <thierry.fournier@ozon.io>
Sat, 12 Nov 2016 12:11:47 +0000 (13:11 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Nov 2016 14:23:17 +0000 (15:23 +0100)
The availaible size in the stack is check two times. This patch removes
this double check.

Must be backported in 1.6

src/hlua.c

index 5a1785de56e6cf6f96587848a74b5fec0ff07f8b..deff4cc83095dc2d2b0bbc65db83e924acd605bb 100644 (file)
@@ -5378,11 +5378,6 @@ static int hlua_sample_fetch_wrapper(const struct arg *arg_p, struct sample *smp
                                RESET_SAFE_LJMP(stream->hlua.T);
                                return 0;
                        }
-                       if (!lua_checkstack(stream->hlua.T, 1)) {
-                               SEND_ERR(smp->px, "Lua sample-fetch '%s': full stack.\n", fcn->name);
-                               RESET_SAFE_LJMP(stream->hlua.T);
-                               return 0;
-                       }
                        hlua_arg2lua(stream->hlua.T, arg_p);
                        stream->hlua.nargs++;
                }