Fix a bug in ble_l2cap_sig_extract_expired

Next should be updated to point at the previous element in the list for removal to work correctly.
This commit is contained in:
Deomid Ryabkov
2023-09-20 08:48:16 +02:00
committed by Szymon Janc
parent a35cb28ef0
commit c1e26371c6
+2 -1
View File
@@ -1905,9 +1905,10 @@ ble_l2cap_sig_extract_expired(struct ble_l2cap_sig_proc_list *dst_list)
ble_hs_lock();
prev = NULL;
next = NULL;
proc = STAILQ_FIRST(&ble_l2cap_sig_procs);
while (proc != NULL) {
prev = next;
next = STAILQ_NEXT(proc, next);
time_diff = proc->exp_os_ticks - now;