We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f71333a commit 57368d0Copy full SHA for 57368d0
nimble/controller/src/ble_ll_isoal.c
@@ -60,24 +60,19 @@ void
60
ble_ll_isoal_mux_free(struct ble_ll_isoal_mux *mux)
61
{
62
struct os_mbuf_pkthdr *pkthdr;
63
- struct os_mbuf *om;
64
- struct os_mbuf *om_next;
65
66
pkthdr = STAILQ_FIRST(&mux->sdu_q);
67
while (pkthdr) {
68
- om = OS_MBUF_PKTHDR_TO_MBUF(pkthdr);
+ /* remove from list before freeing om */
+ STAILQ_REMOVE_HEAD(&mux->sdu_q, omp_next);
69
70
- while (om) {
71
- om_next = SLIST_NEXT(om, om_next);
72
- os_mbuf_free(om);
73
- om = om_next;
74
- }
+ os_mbuf_free_chain(OS_MBUF_PKTHDR_TO_MBUF(pkthdr));
75
76
- STAILQ_REMOVE_HEAD(&mux->sdu_q, omp_next);
77
78
}
79
80
STAILQ_INIT(&mux->sdu_q);
+ mux->sdu_q_len = 0;
81
82
83
void
0 commit comments