NFC: Fixed skb leak in tm_send() nfc and hci ops implementations

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Eric Lapuyade 2012-12-04 16:44:25 +01:00 committed by Samuel Ortiz
parent 40d06d3647
commit 924d4a023e
2 changed files with 12 additions and 4 deletions

View file

@ -675,8 +675,10 @@ static int hci_tm_send(struct nfc_dev *nfc_dev, struct sk_buff *skb)
if (hdev->ops->tm_send)
return hdev->ops->tm_send(hdev, skb);
else
return -ENOTSUPP;
kfree_skb(skb);
return -ENOTSUPP;
}
static int hci_check_presence(struct nfc_dev *nfc_dev,