Unverified Commit 436c66fb authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14668 Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()

parents 6bb1275f c5bdd25f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1864,6 +1864,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
	chan = l2cap_chan_create();
	if (!chan) {
		sk_free(sk);
		sock->sk = NULL;
		return NULL;
	}