Skip to content

Commit

Permalink
NFC: Fix a potential memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thierry Escande authored and Samuel Ortiz committed Jun 14, 2013
1 parent 17f7ae1 commit f1b79dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/nfc/llcp_core.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit f1b79dc

Please sign in to comment.