From 6ece15cc69504348ad484564d14968c542987053 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Tue, 18 Aug 2015 00:33:29 -0300 Subject: Linux-libre 4.1.6-gnu --- net/bluetooth/smp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'net/bluetooth') diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 1ab3dc9c8..7b815bcc8 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -2295,6 +2295,10 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level) return 1; chan = conn->smp; + if (!chan) { + BT_ERR("SMP security requested but not available"); + return 1; + } if (!hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED)) return 1; -- cgit v1.2.3-54-g00ecf