]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl/cli: cleanup on cli_parse_set_cert error
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 28 Oct 2019 13:26:56 +0000 (14:26 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 28 Oct 2019 13:57:37 +0000 (14:57 +0100)
Since commit 90b098c ("BUG/MINOR: cli: don't call the kw->io_release if
kw->parse failed"), the io_release() callback is not called anymore when
the parse() failed. Call it directly on the error path of the
cli_parse_set_cert() function.

src/ssl_sock.c

index 0ef30c7719cbc9d38e2cff0ed808076d77609746..c8bc5e24b57fa5c964684a443569e44b5267b71c 100644 (file)
@@ -10291,6 +10291,7 @@ end:
 
        if (errcode & ERR_CODE) {
                /* we release the spinlock and free the unused structures in the release function */
+               cli_release_set_cert(appctx);
                return cli_dynerr(appctx, memprintf(&err, "%sCan't update %s!\n", err ? err : "", args[3]));
        } else
                return 0;