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

Commit f1b79dc8 authored by Thierry Escande's avatar Thierry Escande Committed by Samuel Ortiz
Browse files

NFC: Fix a potential memory leak



In nfc_llcp_tx_work() the sk_buff is not freed when the llcp_sock
is null and the PDU is an I one.

Signed-off-by: default avatarThierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 17f7ae16
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -719,6 +719,7 @@ static void nfc_llcp_tx_work(struct work_struct *work)
		llcp_sock = nfc_llcp_sock(sk);

		if (llcp_sock == NULL && nfc_llcp_ptype(skb) == LLCP_PDU_I) {
			kfree_skb(skb);
			nfc_llcp_send_symm(local->dev);
		} else {
			struct sk_buff *copy_skb = NULL;