From b99d8efb88ee62a4b318c681db59b9ec104b61df Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 2 Nov 2026 11:07:09 -0400 Subject: [PATCH] MT#55283 fix iqueue pop linkage Change-Id: If5b2969548bb3b58abe8c48d8d0f265e558ab416 (cherry picked from commit 8af55fd116d31005f6326cdf5fd0d41b25b62e5d) (cherry picked from commit 6f4c829187dae9ac5f966b7d588618600e887ddc) --- lib/iqueue.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/iqueue.h b/lib/iqueue.h index 3f67123d9..feca120b3 100644 --- a/lib/iqueue.h +++ b/lib/iqueue.h @@ -57,6 +57,10 @@ (list)->length--; \ if (!(list)->head) \ (list)->tail = NULL; \ + else { \ + __auto_type __head = (__typeof((list)->offset)) (list)->head; \ + __head->link.prev = NULL; \ + } \ } \ __ret; \ }) @@ -104,6 +108,7 @@ } \ else \ (list)->head = __link->link.next; \ + __link->link.next = __link->link.prev = NULL; \ (list)->length--; \ } while (0)