From: William Lallemand Date: Mon, 28 Oct 2019 13:26:56 +0000 (+0100) Subject: BUG/MINOR: ssl/cli: cleanup on cli_parse_set_cert error X-Git-Tag: v2.1-dev4~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1212db417b198820ab14c754dc847a46a48698a0;p=thirdparty%2Fhaproxy.git BUG/MINOR: ssl/cli: cleanup on cli_parse_set_cert error 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. --- diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 0ef30c7719..c8bc5e24b5 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -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;