]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h2: In h2_send(), stop the loop if we failed to alloc a buf.
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 29 Jan 2019 17:28:36 +0000 (18:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Jan 2019 18:47:20 +0000 (19:47 +0100)
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.

src/mux_h2.c

index afb3ad53bdf9a62833333160105310d3bd0b6d64..8f8c37b4db71de4d89589ee9f057406261c267c7 100644 (file)
@@ -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;