summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/hci_sync.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 02661d42bf56..48a276ebc473 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -6763,6 +6763,9 @@ static void create_le_conn_complete(struct hci_dev *hdev, void *data, int err)
hci_dev_lock(hdev);
+ if (!hci_conn_valid(hdev, conn))
+ goto done;
+
if (!err) {
hci_connect_le_scan_cleanup(conn, 0x00);
goto done;