diff options
author | Thierry Escande <thierry.escande@linux.intel.com> | 2013-06-05 17:15:59 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-14 13:45:06 +0200 |
commit | f1b79dc8915ebf176d6f1fcfc4fee001b6d5ca46 (patch) | |
tree | 260c43828c955f23d3a5874562bcf4dfb62f938a /net/nfc | |
parent | 17f7ae16aef1f58bc4af4c7a16b8778a91a30255 (diff) | |
download | lwn-f1b79dc8915ebf176d6f1fcfc4fee001b6d5ca46.tar.gz lwn-f1b79dc8915ebf176d6f1fcfc4fee001b6d5ca46.zip |
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 <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/llcp_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |