Unverified Commit 75584e8c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

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

parents da8b132d a7f9ae7a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1885,6 +1885,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;
	}