Diff between d84ce72a543e090665a33ecac64b604805d2ec4c and 35947e26771c89d965aec5ad059267bb8c15298e

Changed Files

File Additions Deletions Status
monitor/att.c +8 -1 modified

Full Patch

diff --git a/monitor/att.c b/monitor/att.c
index d14cbd1..170b5d8 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();