Bluetooth: Fix LE Pairing on previous connections
There was a crashing issue when pairing was performed on LE connections
that were already up, due to a NULL function pointer being followed.
Signed-off-by: Brian Gix <bgix@codeaurora.org>
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 8b2a92e..9089e65 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -973,7 +973,8 @@
}
if (hcon->out || rsp->resp_key_dist) {
- hcon->disconn_cfm_cb(hcon, 0);
+ if (hcon->disconn_cfm_cb)
+ hcon->disconn_cfm_cb(hcon, 0);
hci_conn_put(hcon);
}