From 9c4da93796f14db372809e5e4ab7d76c9f190327 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 21 Jan 2022 14:54:58 +0100 Subject: [PATCH] MINOR: quic: do not use quic_conn after dropping it 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 469910edd4..601e997b40 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -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. */ -- 2.47.3