summaryrefslogtreecommitdiffstats
path: root/net/nfc/nci/data.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--net/nfc/nci/data.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c
index 9e3f9460f..5d46d8dfa 100644
--- a/net/nfc/nci/data.c
+++ b/net/nfc/nci/data.c
@@ -291,8 +291,10 @@ void nci_rx_data_packet(struct nci_dev *ndev, struct sk_buff *skb)
nci_plen(skb->data));
conn_info = nci_get_conn_info_by_conn_id(ndev, nci_conn_id(skb->data));
- if (!conn_info)
+ if (!conn_info) {
+ kfree_skb(skb);
return;
+ }
/* strip the nci data header */
skb_pull(skb, NCI_DATA_HDR_SIZE);