From: Emeric Brun Date: Thu, 29 Jun 2017 17:54:13 +0000 (+0200) Subject: BUG/MAJOR: cli: fix custom io_release was crushed by NULL. X-Git-Tag: v1.8-dev3~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6871f785f5a57a051cf593df64d79927180699f;p=thirdparty%2Fhaproxy.git BUG/MAJOR: cli: fix custom io_release was crushed by NULL. The io_release could be set into the parsing request handler and must not be crushed. This patch should be backported on mainline branches 1.7 and 1.6 --- diff --git a/src/cli.c b/src/cli.c index 55115d689b..fef34e9710 100644 --- a/src/cli.c +++ b/src/cli.c @@ -464,9 +464,10 @@ static int cli_parse_request(struct appctx *appctx, char *line) return 0; appctx->io_handler = kw->io_handler; + appctx->io_release = kw->io_release; + /* kw->parse could set its own io_handler or ip_release handler */ if ((!kw->parse || kw->parse(args, appctx, kw->private) == 0) && appctx->io_handler) { appctx->st0 = CLI_ST_CALLBACK; - appctx->io_release = kw->io_release; } return 1; }