From: Thierry Escande Date: Wed, 5 Jun 2013 15:15:59 +0000 (+0200) Subject: NFC: Fix a potential memory leak X-Git-Tag: v4.13~9188^2~166^2^2~37^2~6 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f1b79dc8915ebf176d6f1fcfc4fee001b6d5ca46;p=mirror_ubuntu-bionic-kernel.git 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: Thierry Escande Signed-off-by: Samuel Ortiz --- diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c index 1c4c048e0a1b..44730f0edfd8 100644 --- a/net/nfc/llcp_core.c +++ b/net/nfc/llcp_core.c @@ -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;