]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: session: Remove the session from the session_list in session_free.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 29 Nov 2018 16:50:45 +0000 (17:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 1 Dec 2018 09:47:15 +0000 (10:47 +0100)
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.

src/session.c

index 29f92438b5340afe8eabeb2d5300d995e4f5a5df..807af2e409d1dcdacc0c692a35a09c8dfce5a1db 100644 (file)
@@ -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);
 }