From: Christopher Faulet Date: Thu, 15 Dec 2022 08:59:50 +0000 (+0100) Subject: BUG/MINOR: mux-h1: Fix test instead a BUG_ON() in h1_send_error() X-Git-Tag: v2.8-dev1~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f1f1b05795f7114c5bbb0cf3bffdf86ed299370;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h1: Fix test instead a BUG_ON() in h1_send_error() In the previous patch (86924532db "BUG/MINOR: mux-h1: Fix test instead a BUG_ON() in h1_send_error()"), a BUG_ON() condition was inverted by error in h1_send_error(). The stream-connector must be NULL to be able to destroy the H1 stream. This patch must be backported with the commit above (to 2.7). --- diff --git a/src/mux_h1.c b/src/mux_h1.c index c511cfede7..fb1363bc00 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2630,7 +2630,7 @@ static int h1_send_error(struct h1c *h1c) } if (h1c->state == H1_CS_EMBRYONIC) { - BUG_ON(h1c->h1s == NULL || h1s_sc(h1c->h1s) == NULL); + BUG_ON(h1c->h1s == NULL || h1s_sc(h1c->h1s) != NULL); TRACE_DEVEL("Abort embryonic H1S", H1_EV_H1C_ERR, h1c->conn, h1c->h1s); h1s_destroy(h1c->h1s); }