Skip to content

Commit

Permalink
Fix a bug in ble_l2cap_sig_extract_expired
Browse files Browse the repository at this point in the history
Next should be updated to point at the previous element in the list for removal to work correctly.
  • Loading branch information
rojer authored and sjanc committed Sep 20, 2023
1 parent a35cb28 commit c1e2637
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nimble/host/src/ble_l2cap_sig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c1e2637

Please sign in to comment.