From fe1c908744dc36f2c2b5a71eead822a64ef64a48 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 30 Aug 2019 14:57:17 +0200 Subject: [PATCH] BUG/MEDIUM: mux-h2/trace: do not dereference h2c->conn after failed idle In h2_detach(), if session_check_idle_conn() returns <0 we must not dereference it since it has been freed. No backport is needed. --- src/mux_h2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index 7bbaca9c9..f4ab7c671 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -3751,7 +3751,7 @@ static void h2_detach(struct conn_stream *cs) if (eb_is_empty(&h2c->streams_by_id)) { if (session_check_idle_conn(h2c->conn->owner, h2c->conn) != 0) /* At this point either the connection is destroyed, or it's been added to the server idle list, just stop */ - TRACE_DEVEL("leaving with non-reusable idle connection", H2_EV_STRM_END, h2c->conn); + TRACE_DEVEL("leaving without reusable idle connection", H2_EV_STRM_END); return; } /* Never ever allow to reuse a connection from a non-reuse backend */