]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: hq-interop: fix leak in case of rcv_buf early return
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 27 Feb 2025 17:07:17 +0000 (18:07 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 28 Feb 2025 16:37:00 +0000 (17:37 +0100)
commitd0f97040a33c31f7d4b839ced4f5aa598f76bcdd
treea3dd0b92528d75d2b7a4888b84ceaeee2049d5ec
parentfd5d59967ad780563298a176db6e657f22831d50
BUG/MINOR: hq-interop: fix leak in case of rcv_buf early return

HTTP/0.9 parser was recently updated to support truncated requests in
rcv_buf operation. However, this caused a leak as input buffer is
allocated early.

In fact, the leak was already present in case of fatal errors. Fix this
by first delaying buffer allocation, so that initial checks are
performed before. Then, ensure that buffer is released in case of a
latter error.

This is considered as minor, as HTTP/0.9 is reserved for experiment and
QUIC interop usages.

This should be backported up to 2.6.
src/hq_interop.c