diff options
author | Thierry Escande <thierry.escande@linux.intel.com> | 2013-06-05 11:15:59 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-14 07:45:06 -0400 |
commit | f1b79dc8915ebf176d6f1fcfc4fee001b6d5ca46 (patch) | |
tree | 260c43828c955f23d3a5874562bcf4dfb62f938a /net/nfc | |
parent | 17f7ae16aef1f58bc4af4c7a16b8778a91a30255 (diff) |
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) | |||
719 | llcp_sock = nfc_llcp_sock(sk); | 719 | llcp_sock = nfc_llcp_sock(sk); |
720 | 720 | ||
721 | if (llcp_sock == NULL && nfc_llcp_ptype(skb) == LLCP_PDU_I) { | 721 | if (llcp_sock == NULL && nfc_llcp_ptype(skb) == LLCP_PDU_I) { |
722 | kfree_skb(skb); | ||
722 | nfc_llcp_send_symm(local->dev); | 723 | nfc_llcp_send_symm(local->dev); |
723 | } else { | 724 | } else { |
724 | struct sk_buff *copy_skb = NULL; | 725 | struct sk_buff *copy_skb = NULL; |