Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49dfbb91 authored by Jaganath Kanakkassery's avatar Jaganath Kanakkassery Committed by Gustavo Padovan
Browse files

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: default avatarJaganath Kanakkassery <jaganath.k@samsung.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent d08fd0e7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}