From 523b02e4e79f6afd3c7e95ed6ef7f04ef061ca4c Mon Sep 17 00:00:00 2001 From: Sorgelig Date: Tue, 31 Aug 2021 06:27:02 +0800 Subject: [PATCH] hci_conn: prevent call with NULL pointer. --- net/bluetooth/hci_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 2b5059a56..68bc83fed 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -805,7 +805,7 @@ static void create_le_conn_complete(struct hci_dev *hdev, u8 status, u16 opcode) hci_req_resume_adv_instances(hdev); if (!status) { - hci_connect_le_scan_cleanup(conn); + if(conn) hci_connect_le_scan_cleanup(conn); goto done; }