Commit 5a45547c8e for openssl.org

commit 5a45547c8e9450936f78ae96579ce31881f9041a
Author: Alexandr Nedvedicky <sashan@openssl.org>
Date:   Tue Dec 16 11:01:43 2025 +0100

    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 <matt@openssl.org>
    Reviewed-by: Norbert Pocs <norbertp@openssl.org>
    (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 63bfbb205a..826d387c2e 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);
     }
 }