]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: don't leave dangling pointer after freeing qcs->sd
authorWilly Tarreau <w@1wt.eu>
Tue, 6 Aug 2024 16:59:39 +0000 (18:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Aug 2024 14:02:59 +0000 (16:02 +0200)
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

index 54574ebe4ea99fe45b60b68a7271a058685529d0..dc7b6d54cfb37474de277bd450399975784465d7 100644 (file)
@@ -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)