From: Olivier Houchard Date: Tue, 29 Jan 2019 17:28:36 +0000 (+0100) Subject: BUG/MEDIUM: h2: In h2_send(), stop the loop if we failed to alloc a buf. X-Git-Tag: v2.0-dev1~118 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b09443e043bb58b8d3855b21a6b1183f3e1690a;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: h2: In h2_send(), stop the loop if we failed to alloc a buf. In h2_send(), make sure we break the loop if we failed to alloc a buffer, or we'd end up looping endlessly. This should be backported to 1.9. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index afb3ad53bd..8f8c37b4db 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -2723,6 +2723,9 @@ static int h2_send(struct h2c *h2c) while (((h2c->flags & (H2_CF_MUX_MFULL|H2_CF_MUX_MALLOC)) == 0) && !done) done = h2_process_mux(h2c); + if (h2c->flags & H2_CF_MUX_MALLOC) + break; + if (conn->flags & CO_FL_ERROR) break;