The code was using queue_find instead of queue_remove_if so follow up
read wouldn't match the attribute properly.
Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
return;
handler = get_handler(attr);
- if (!handler)
+ if (!handler || !handler->read)
return;
conn = packet_get_conn_data(frame->handle);
data = conn->data;
- read = queue_find(data->reads, match_read_frame, frame);
+ read = queue_remove_if(data->reads, match_read_frame, (void *)frame);
if (!read)
return;
read->func(frame);
+
+ free(read);
}
static void att_read_blob_req(const struct l2cap_frame *frame)