From e6ef4cd7472af6c09d61ff7455bdab748196b879 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 17 Nov 2022 15:54:12 +0100 Subject: [PATCH] BUG/MINOR: mux-h1: Fix error handling when H1S allocation failed on client side The goto label is not at the right place. When H1S allocation failed, the error is immediately handled. Thus, "no_parsing" label must be set just after h1_send() call to skip the request parsing part. It is 2-7-specific. No backport needed. --- src/mux_h1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_h1.c b/src/mux_h1.c index 36a55f976..1ab6758ac 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2981,7 +2981,6 @@ static int h1_process(struct h1c * h1c) h1_release_buf(h1c, &h1s->rxbuf); h1_set_idle_expiration(h1c); - no_parsing: if (h1s->flags & H1S_F_INTERNAL_ERROR) { h1_handle_internal_err(h1c); h1c->flags &= ~H1C_F_WAIT_NEXT_REQ; @@ -3003,6 +3002,7 @@ static int h1_process(struct h1c * h1c) } } + no_parsing: h1_send(h1c); /* H1 connection must be released ASAP if: