summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJaganath Kanakkassery <jaganath.k@samsung.com>2012-07-19 07:24:04 (GMT)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-08-06 18:19:37 (GMT)
commit49dfbb9129c4edb318578de35cc45c555df37884 (patch)
tree64508a0d4d7cc178f81de89873aa33c630fa9585 /net/bluetooth
parentd08fd0e712a834d4abb869c0215a702e290bc51e (diff)
downloadlinux-49dfbb9129c4edb318578de35cc45c555df37884.tar.xz
Bluetooth: Fix socket not getting freed if l2cap channel create fails
If l2cap_chan_create() fails then it will return from l2cap_sock_kill since zapped flag of sk is reset. Signed-off-by: Jaganath Kanakkassery <jaganath.k@samsung.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap_sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index a4bb27e..b94abd3 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -1174,7 +1174,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, int p
chan = l2cap_chan_create();
if (!chan) {
- l2cap_sock_kill(sk);
+ sk_free(sk);
return NULL;
}