]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: cli: don't call the kw->io_release if kw->parse failed
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 25 Oct 2019 19:10:14 +0000 (21:10 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 25 Oct 2019 20:00:49 +0000 (22:00 +0200)
commit90b098c921e15f912dbde42658e34780f0ba446d
tree908136dfdbaf967e03f9cfa97476bf731f82c0a0
parentc70df5325022189c690b825b2852cb6542c7207f
BUG/MINOR: cli: don't call the kw->io_release if kw->parse failed

The io_release() callback of the cli_kw is supposed to be used to clean
what an io_handler() has made. It is called once the work in the IO
handler is finished, or when the connection was aborted by the client.

This patch fixes a bug where the io_release callback was called even
when the parse() callback failed. Which means that the io_release() could
called even if the io_handler() was not called.

Should be backported in every versions that have a cli_kw->release().
(as far as 1.7)
src/cli.c