From b2cede590b04afd647c6cca53da6873d1b5e2535 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 6 Aug 2024 18:59:39 +0200 Subject: [PATCH] MINOR: mux-quic: don't leave dangling pointer after freeing qcs->sd In qcs_free() we're calling a few other functions after releasing qcs->sd. None of them make use of it for now but with traces that will change. Make sure to clear qcs->sd after releasing it. --- src/mux_quic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mux_quic.c b/src/mux_quic.c index 54574ebe4e..dc7b6d54cf 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -67,6 +67,7 @@ static void qcs_free(struct qcs *qcs) /* Release stream endpoint descriptor. */ BUG_ON(qcs->sd && !se_fl_test(qcs->sd, SE_FL_ORPHAN)); sedesc_free(qcs->sd); + qcs->sd = NULL; /* Release app-layer context. */ if (qcs->ctx && qcc->app_ops->detach) -- 2.47.3