From: Alexandr Nedvedicky Date: Tue, 16 Dec 2025 10:01:43 +0000 (+0100) Subject: The stream garbage collector loop in ossl_quic_stream_map_gc() is never entered X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a45547c8e9450936f78ae96579ce31881f9041a;p=thirdparty%2Fopenssl.git The stream garbage collector loop in ossl_quic_stream_map_gc() is never entered Also remove ready_for_gc_next(), it is not needed any more. Reviewed-by: Matt Caswell Reviewed-by: Norbert Pocs (Merged from https://github.com/openssl/openssl/pull/29402) --- diff --git a/ssl/quic/quic_stream_map.c b/ssl/quic/quic_stream_map.c index 63bfbb205ac..826d387c2e0 100644 --- a/ssl/quic/quic_stream_map.c +++ b/ssl/quic/quic_stream_map.c @@ -67,8 +67,6 @@ static QUIC_STREAM *list_next(QUIC_STREAM_LIST_NODE *l, QUIC_STREAM_LIST_NODE *n offsetof(QUIC_STREAM, active_node)) #define accept_next(l, s) list_next((l), &(s)->accept_node, \ offsetof(QUIC_STREAM, accept_node)) -#define ready_for_gc_next(l, s) list_next((l), &(s)->ready_for_gc_node, \ - offsetof(QUIC_STREAM, ready_for_gc_node)) #define accept_head(l) list_next((l), (l), \ offsetof(QUIC_STREAM, accept_node)) #define ready_for_gc_head(l) list_next((l), (l), \ @@ -806,13 +804,9 @@ size_t ossl_quic_stream_map_get_total_accept_queue_len(QUIC_STREAM_MAP *qsm) void ossl_quic_stream_map_gc(QUIC_STREAM_MAP *qsm) { - QUIC_STREAM *qs, *qs_head, *qsn = NULL; - - for (qs = qs_head = ready_for_gc_head(&qsm->ready_for_gc_list); - qs != NULL && qs != qs_head; - qs = qsn) { - qsn = ready_for_gc_next(&qsm->ready_for_gc_list, qs); + QUIC_STREAM *qs; + while ((qs = ready_for_gc_head(&qsm->ready_for_gc_list)) != NULL) { ossl_quic_stream_map_release(qsm, qs); } }