]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: hlua: Don't call RESET_SAFE_LJMP if SET_SAFE_LJMP returns 0.
authorOlivier Houchard <ohouchard@haproxy.com>
Mon, 27 Aug 2018 10:59:14 +0000 (12:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 31 Aug 2018 14:14:58 +0000 (16:14 +0200)
If SET_SAFE_LJMP returns 0, the spinlock is already unlocked, and lua_atpanic
is already set back to hlua_panic_safe, so there's no need to call
RESET_SAFE_LJMP.

This should be MFC'd into 1.8.

src/hlua.c

index 67bc93c6bb090fcad77a1ada1d257c34c4af7b41..f07df4708d513a59cc2d66968ffddf7371f87e84 100644 (file)
@@ -6391,7 +6391,6 @@ static int hlua_applet_tcp_init(struct appctx *ctx, struct proxy *px, struct str
                        error = "critical error";
                SEND_ERR(px, "Lua applet tcp '%s': %s.\n",
                         ctx->rule->arg.hlua_rule->fcn.name, error);
-               RESET_SAFE_LJMP(hlua->T);
                return 0;
        }