]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cli: also free the trash chunk on the error path
authorWilly Tarreau <w@1wt.eu>
Mon, 20 Oct 2025 12:50:27 +0000 (14:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 20 Oct 2025 12:58:53 +0000 (14:58 +0200)
commite63e98f1d83547fa2911ff896c1e33d9cfbcf58e
tree7faded184e5b9e36a33e7b3c4415ee6a66bc7311
parentedd21121d2e0251e10ee05c2ba535722289f273d
BUG/MEDIUM: cli: also free the trash chunk on the error path

Since commit 20ec1de214 ("MAJOR: cli: Refacor parsing and execution of
pipelined commands"), command not returning any response (e.g. "quit")
don't pass through the free_trash_chunk() call, possibly leaking the
cmdline buffer. A typical way to reproduce it is to loop on "quit" on
the CLI, though it very likely affects other specific commands.

Let's make sure in the release handler that we always release that
chunk in any case. This must be backported to 3.2.
src/cli.c