]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h1: Release empty ibuf during data fast-forwarding
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 8 Nov 2023 15:34:32 +0000 (16:34 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 8 Nov 2023 15:38:06 +0000 (16:38 +0100)
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.

src/mux_h1.c

index 6be547088bbbc9c29c0acf4317ab8057a7b2b074..918005573030afb9eaf58a5ad1f832299aba3bfd 100644 (file)
@@ -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 */