]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: sessions: Always pass the mux context as argument to destroy a mux
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Apr 2020 13:53:41 +0000 (15:53 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Apr 2020 13:53:43 +0000 (15:53 +0200)
This bug was introduced by the commit 2444aa5b ("MEDIUM: sessions: Don't be
responsible for connections anymore."). In session_check_idle_conn(), when the
mux is destroyed, its context must be passed as argument instead of the
connection.

It is de 2.2-dev bug. No need to backport.

include/proto/session.h

index b6f31f1765af9e30f78e68c5b7b1e310f6cf03df..a5b95a8deadf87c5fe76064c1c6b4eac944ccc00 100644 (file)
@@ -126,7 +126,7 @@ static inline int session_check_idle_conn(struct session *sess, struct connectio
                session_unown_conn(sess, conn);
                conn->owner = NULL;
                conn->flags &= ~CO_FL_SESS_IDLE;
-               conn->mux->destroy(conn);
+               conn->mux->destroy(conn->ctx);
                return -1;
        } else {
                conn->flags |= CO_FL_SESS_IDLE;