]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: do not use quic_conn after dropping it
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 21 Jan 2022 13:54:58 +0000 (14:54 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 21 Jan 2022 14:02:56 +0000 (15:02 +0100)
quic_conn_drop decrement the refcount and may free the quic_conn if
reaching 0. The quic_conn should not be dereferenced again after it in
any case even for traces.

src/xprt_quic.c

index 469910edd410685f7dd62c6df22288333ce719c8..601e997b40939d5e74ddcac5b19c4274b4dc49d0 100644 (file)
@@ -3426,8 +3426,9 @@ void quic_close(struct connection *conn, void *xprt_ctx)
                conn_ctx->wait_event.tasklet = NULL;
        }
 
-       quic_conn_drop(qc);
        TRACE_LEAVE(QUIC_EV_CONN_CLOSE, qc);
+
+       quic_conn_drop(qc);
 }
 
 /* Callback called upon loss detection and PTO timer expirations. */