diff options
Diffstat (limited to 'monitor/att.c')
-rw-r--r-- | monitor/att.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/monitor/att.c b/monitor/att.c index d14cbd165..170b5d875 100644 --- a/monitor/att.c +++ b/monitor/att.c @@ -2576,7 +2576,12 @@ static void att_conn_data_free(void *data) static struct att_conn_data *att_get_conn_data(struct packet_conn_data *conn) { - struct att_conn_data *data = conn->data; + struct att_conn_data *data; + + if (!conn) + return NULL; + + data = conn->data; if (data) return data; @@ -2610,6 +2615,8 @@ static void att_read_type_req(const struct l2cap_frame *frame) conn = packet_get_conn_data(frame->handle); data = att_get_conn_data(conn); + if (!data) + return; if (!data->reads) data->reads = queue_new(); |