MariuszSkamra commented on code in PR #2038:
URL: https://github.com/apache/mynewt-nimble/pull/2038#discussion_r2290829913
##########
nimble/controller/src/ble_ll_sched.c:
##########
@@ -920,6 +920,11 @@ ble_ll_sched_rmv_elem_type(uint8_t type,
sched_remove_cb_func remove_cb)
OS_ENTER_CRITICAL(sr);
first = TAILQ_FIRST(&g_ble_ll_sched_q);
+ if (!first) {
+ OS_EXIT_CRITICAL(sr);
+ return;
+ }
+
if (first->sched_type == type) {
first_removed = 1;
}
Review Comment:
Please note that this shall be fixed as well as `first_removed` can be left
uninitialized.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]