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.
This commit is contained in:
Willy Tarreau 2019-08-30 14:57:17 +02:00
parent 1d181e489c
commit fe1c908744

View File

@ -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 */