Skip to content

Commit f783be0

Browse files
committed
nimble/ll: Add missing NULL pointer check
1 parent 9d0217a commit f783be0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nimble/controller/src/ble_ll_sched.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,10 @@ ble_ll_sched_rmv_elem_type(uint8_t type, sched_remove_cb_func remove_cb)
920920
OS_ENTER_CRITICAL(sr);
921921

922922
first = TAILQ_FIRST(&g_ble_ll_sched_q);
923+
if (!first) {
924+
return;
925+
}
926+
923927
if (first->sched_type == type) {
924928
first_removed = 1;
925929
}

0 commit comments

Comments
 (0)