From: Amaury Denoyelle Date: Wed, 19 Apr 2023 09:49:16 +0000 (+0200) Subject: BUG/MINOR: h3: fix crash on h3s alloc failure X-Git-Tag: v2.8-dev8~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bbfa72b672c833c56779c08063d0c6af6230762;p=thirdparty%2Fhaproxy.git BUG/MINOR: h3: fix crash on h3s alloc failure Do not emit a CONNECTION_CLOSE on h3s allocation failure. Indeed, this causes a crash as the calling function qcs_new() will also try to emit a CONNECTION_CLOSE which triggers a BUG_ON() on qcc_emit_cc(). This was reproduced using -dMfail. This should be backported up to 2.7. --- diff --git a/src/h3.c b/src/h3.c index 909942bfd4..09099ec479 100644 --- a/src/h3.c +++ b/src/h3.c @@ -1707,7 +1707,6 @@ static int h3_attach(struct qcs *qcs, void *conn_ctx) h3s = pool_alloc(pool_head_h3s); if (!h3s) { TRACE_ERROR("h3s allocation failure", H3_EV_H3S_NEW, qcs->qcc->conn, qcs); - qcc_emit_cc_app(qcs->qcc, H3_INTERNAL_ERROR, 1); goto err; }