]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: threads/server: missing unlock in CLI fqdn parser
authorWilly Tarreau <w@1wt.eu>
Sun, 5 Nov 2017 08:58:01 +0000 (09:58 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 5 Nov 2017 09:13:37 +0000 (10:13 +0100)
This one didn't properly unlock before returning an error message.

src/server.c

index 555d6da19da712a3771db7d088ab3971b01f8f7b..c96b096e2b7fbc5ee0517573c0dbfb06d4c8609b 100644 (file)
@@ -4202,6 +4202,7 @@ static int cli_parse_set_server(char **args, struct appctx *appctx, void *privat
                if (!*args[4]) {
                        appctx->ctx.cli.msg = "set server <b>/<s> fqdn requires a FQDN.\n";
                        appctx->st0 = CLI_ST_PRINT;
+                       SPIN_UNLOCK(SERVER_LOCK, &sv->lock);
                        return 1;
                }
                warning = update_server_fqdn(sv, args[4], "stats socket command", 0);