From: Christopher Faulet Date: Wed, 8 Nov 2023 15:34:32 +0000 (+0100) Subject: BUG/MINOR: mux-h1: Release empty ibuf during data fast-forwarding X-Git-Tag: v2.9-dev10~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba6ad4654e5bb86af79c87c69cac3804c5364b33;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h1: Release empty ibuf during data fast-forwarding We must take care to release H1 input buffer when it is emptied during the fast-forwarding nego. Otherwise, it may be kept allocated for a while, waiting for the next "normal" receive or the H1C release. No backport needed. --- diff --git a/src/mux_h1.c b/src/mux_h1.c index 6be547088b..9180055730 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -4590,6 +4590,8 @@ static int h1_fastfwd(struct stconn *sc, unsigned int count, unsigned int flags) h1c->flags &= ~H1C_F_IN_FULL; TRACE_STATE("h1c ibuf not full anymore", H1_EV_STRM_RECV|H1_EV_H1C_BLK); } + if (!b_data(&h1c->ibuf)) + h1_release_buf(h1c, &h1c->ibuf); if (sdo->iobuf.flags & IOBUF_FL_NO_FF) { /* Fast forwading is not supported by the consumer */