-
Notifications
You must be signed in to change notification settings - Fork 463
nimble/ll: Add missing NULL pointer check #2038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| first = TAILQ_FIRST(&g_ble_ll_sched_q); | ||
| if (!first) { | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OS_EXIT_CRITICAL is missing here
f783be0 to
8cf1a24
Compare
Fix potential NULL dereference that occurs when cancelling extended discovery.
8cf1a24 to
eb23027
Compare
|
Force pushed to fix missing commit message |
MariuszSkamra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we found the same issue #2083 :)
| if (first->sched_type == type) { | ||
| first_removed = 1; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that this needs to be fixed as well as first_removed can be left uninitialized.
Fixes a segmentation fault that occurred when canceling ext discovery.