From: Olivier Houchard Date: Thu, 29 Nov 2018 16:50:45 +0000 (+0100) Subject: BUG/MEDIUM: session: Remove the session from the session_list in session_free. X-Git-Tag: v1.9-dev9~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c6109691a4c0cc88c0cec51823777b001ebb162;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: session: Remove the session from the session_list in session_free. When freeing the session, we may fail to free the outgoing connection, because it still has streams attached. So remove ourself from the session list, so that the connection doesn't try to access it later. --- diff --git a/src/session.c b/src/session.c index 29f92438b5..807af2e409 100644 --- a/src/session.c +++ b/src/session.c @@ -88,6 +88,7 @@ void session_free(struct session *sess) conn_full_close(conn); conn_free(conn); } + LIST_DEL(&sess->conn_list); pool_free(pool_head_session, sess); HA_ATOMIC_SUB(&jobs, 1); }