Diff between 649fd8766a0d61f16d39401ba3dd507dfcd49630 and ccbc792aff13daf3a89bbc09c9530b910bb03705
Changed Files
| File | Additions | Deletions | Status |
| src/shared/att.c | +4 | -2 | modified |
Full Patch
diff --git a/src/shared/att.c b/src/shared/att.c
index 67f93fc..55d633b 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -751,10 +751,12 @@ static void handle_notify(struct bt_att *att, uint8_t opcode, uint8_t *pdu,
bt_att_ref(att);
- for (found = false, entry = queue_get_entries(att->notify_list); entry;
- entry = entry->next) {
+ for (found = false, entry = queue_get_entries(att->notify_list);
+ !queue_isempty(att->notify_list) && entry;) {
struct att_notify *notify = entry->data;
+ entry = entry->next;
+
if (!opcode_match(notify->opcode, opcode))
continue;