aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth_mgmt/af_bluetooth.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth_mgmt/af_bluetooth.c')
-rw-r--r--net/bluetooth_mgmt/af_bluetooth.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth_mgmt/af_bluetooth.c b/net/bluetooth_mgmt/af_bluetooth.c
index 7c73a10..c3afcd2 100644
--- a/net/bluetooth_mgmt/af_bluetooth.c
+++ b/net/bluetooth_mgmt/af_bluetooth.c
@@ -224,8 +224,10 @@ void bt_accept_unlink(struct sock *sk)
BT_DBG("sk %p state %d", sk, sk->sk_state);
list_del_init(&bt_sk(sk)->accept_q);
- bt_sk(sk)->parent->sk_ack_backlog--;
- bt_sk(sk)->parent = NULL;
+ if (bt_sk(sk)->parent != NULL) {
+ bt_sk(sk)->parent->sk_ack_backlog--;
+ bt_sk(sk)->parent = NULL;
+ }
sock_put(sk);
}
EXPORT_SYMBOL(bt_accept_unlink);