diff options
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index b3bdb482bbe6..8136752d824b 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -986,8 +986,10 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) | |||
986 | if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT) | 986 | if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT) |
987 | del_timer_sync(&conn->info_timer); | 987 | del_timer_sync(&conn->info_timer); |
988 | 988 | ||
989 | if (test_bit(HCI_CONN_ENCRYPT_PEND, &hcon->pend)) | 989 | if (test_and_clear_bit(HCI_CONN_LE_SMP_PEND, &hcon->pend)) { |
990 | del_timer(&conn->security_timer); | 990 | del_timer(&conn->security_timer); |
991 | hci_conn_put(hcon); | ||
992 | } | ||
991 | 993 | ||
992 | hcon->l2cap_data = NULL; | 994 | hcon->l2cap_data = NULL; |
993 | kfree(conn); | 995 | kfree(conn); |