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

Commit 39a352a5 authored by Samuel Ortiz's avatar Samuel Ortiz
Browse files

NFC: llcp: Keep the connected socket parent pointer alive



And avoid decreasing the ack log twice when dequeueing connected LLCP
sockets.

Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent b3155155
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -270,7 +270,9 @@ struct sock *nfc_llcp_accept_dequeue(struct sock *parent,
		}
		}


		if (sk->sk_state == LLCP_CONNECTED || !newsock) {
		if (sk->sk_state == LLCP_CONNECTED || !newsock) {
			nfc_llcp_accept_unlink(sk);
			list_del_init(&lsk->accept_queue);
			sock_put(sk);

			if (newsock)
			if (newsock)
				sock_graft(sk, newsock);
				sock_graft(sk, newsock);