From: Willy Tarreau Date: Tue, 6 Aug 2024 16:59:39 +0000 (+0200) Subject: MINOR: mux-quic: don't leave dangling pointer after freeing qcs->sd X-Git-Tag: v3.1-dev5~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2cede590b04afd647c6cca53da6873d1b5e2535;p=thirdparty%2Fhaproxy.git 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. --- 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)