linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Fix socket not getting freed if l2cap channel create fails
@ 2012-07-19  7:24 Jaganath Kanakkassery
  2012-07-19  7:52 ` Andrei Emeltchenko
  2012-07-25  7:51 ` Gustavo Padovan
  0 siblings, 2 replies; 6+ messages in thread
From: Jaganath Kanakkassery @ 2012-07-19  7:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jaganath Kanakkassery

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>
---
 net/bluetooth/l2cap_sock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 79350d1..419857d 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;
 	}
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-25  7:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19  7:24 [PATCH] Bluetooth: Fix socket not getting freed if l2cap channel create fails Jaganath Kanakkassery
2012-07-19  7:52 ` Andrei Emeltchenko
2012-07-19 11:20   ` Jaganath Kanakkassery
2012-07-19 11:40     ` Andrei Emeltchenko
2012-07-19 12:17       ` Jaganath Kanakkassery
2012-07-25  7:51 ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).