Skip to content

Commit

Permalink
Bluetooth: Controller: Fix scan aux leak on periodic sync terminate
Browse files Browse the repository at this point in the history
Fix scan aux context leak on Periodic Sync Terminate. On
Periodic Sync Terminate the `is_stop` flag is set to prevent
the ULL from assigning an aux context to the sync context,
but the acquired aux context was neither assigned to sync
context nor was being released back to the aux context pool.
Fixed by releasing the aux context if not assigned to the
sync context when `is_stop` flag is set.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
  • Loading branch information
cvinayak authored and carlescufi committed Sep 29, 2022
1 parent 1a6098f commit ba6cbc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/bluetooth/controller/ll_sw/ull_scan_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ void ull_scan_aux_setup(memq_link_t *link, struct node_rx_hdr *rx)
ll_rx_sched();

sync = HDR_LLL2ULL(sync_lll);
if (unlikely(sync->is_stop)) {
if (unlikely(sync->is_stop && sync_lll->lll_aux)) {
return;
}
}
Expand Down

0 comments on commit ba6cbc5

Please sign in to comment.