]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: fix ack range node pool_free call passing wrong pointer type
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 28 May 2026 05:54:32 +0000 (07:54 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 28 May 2026 15:47:31 +0000 (17:47 +0200)
In quic_insert_new_range(), the variable 'first' is a struct eb64_node*,
but pool_free expects a struct quic_arng_node*. While the addresses are identical
(since 'first' is the first member of quic_arng_node), this is technically
incorrect and should use eb64_entry() for proper type safety.

Must be backported to all versions.

src/quic_ack.c

index bb6e5cfad51ce607951d24c26e3c4833668f5245..228283b6dc44ef636be21addbfc03052ccc0ff28 100644 (file)
@@ -86,7 +86,7 @@ struct quic_arng_node *quic_insert_new_range(struct quic_conn *qc,
                first = eb64_first(&arngs->root);
                BUG_ON(first == NULL);
                eb64_delete(first);
-               pool_free(pool_head_quic_arng, first);
+               pool_free(pool_head_quic_arng, eb64_entry(first, struct quic_arng_node, first));
                arngs->sz--;
        }