]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Reset ->conn quic_conn struct member when calling qc_release()
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 10 Jan 2022 10:40:33 +0000 (11:40 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Tue, 11 Jan 2022 15:12:31 +0000 (16:12 +0100)
There may be remaining locations where ->conn quic_conn struct member
is used. So let's reset this.
Add a trace to have an idead when this connection is released.

src/mux_quic.c

index f9b212f886a2281358baa4253c449c267057b4ff..9326dc819a3a3bd0eca39c75af8e8bf525f69d2a 100644 (file)
@@ -234,6 +234,7 @@ static void qc_release(struct qcc *qcc)
        }
 
        if (conn) {
+               conn->qc->conn = NULL;
                conn->mux = NULL;
                conn->ctx = NULL;
 
@@ -242,6 +243,7 @@ static void qc_release(struct qcc *qcc)
                if (conn->destroy_cb)
                        conn->destroy_cb(conn);
                conn_free(conn);
+               fprintf(stderr, "conn@%p released\n", conn);
        }
 }