From: Olivier Houchard Date: Thu, 29 Nov 2018 12:49:59 +0000 (+0100) Subject: BUG/MEDIUM: mux_pt: Don't forget to unsubscribe() on attach. X-Git-Tag: v1.9-dev9~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ced485b29d6afad53d390542ba4afed5fd5a7aa;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/mux_pt.c b/src/mux_pt.c index 5a80848bec..1f0f3e5a0d 100644 --- a/src/mux_pt.c +++ b/src/mux_pt.c @@ -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;