]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
The stream garbage collector loop in ossl_quic_stream_map_gc() is never entered
authorAlexandr Nedvedicky <sashan@openssl.org>
Tue, 16 Dec 2025 10:01:43 +0000 (11:01 +0100)
committerNorbert Pocs <norbertp@openssl.org>
Thu, 18 Dec 2025 10:11:03 +0000 (11:11 +0100)
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)

ssl/quic/quic_stream_map.c

index 63bfbb205ac4dce0e3294e6152963d43dee91b26..826d387c2e0e09e81706f4af0f7c0613c1c54565 100644 (file)
@@ -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);
     }
 }