BUG/MEDIUM: mux_pt: Don't forget to unsubscribe() on attach.

In the mux_pt, when we're attaching a new conn_stream, don't forget to
unsubscribe from the connection. Failure to do so may lead to the mux_pt
freeing the connection while the conn_stream can still want to access it.
This commit is contained in:
Olivier Houchard 2018-11-29 13:49:59 +01:00 committed by Willy Tarreau
parent a3fe1bb901
commit 1ced485b29

View File

@ -142,6 +142,7 @@ static struct conn_stream *mux_pt_attach(struct connection *conn)
struct conn_stream *cs;
struct mux_pt_ctx *ctx = conn->mux_ctx;
conn->xprt->unsubscribe(conn, SUB_CAN_RECV, &ctx->wait_event);
cs = cs_new(conn);
if (!cs)
goto fail;