Browse Source

NFC: use kfree_skb() for sk_buffs

This is a struct sk_buff pointer and it should be freed with kfree_skb()
instead of kfree().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter 13 năm trước cách đây
mục cha
commit
5b68a7ca32
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      net/nfc/llcp/llcp.c

+ 1 - 1
net/nfc/llcp/llcp.c

@@ -954,7 +954,7 @@ void nfc_llcp_unregister_device(struct nfc_dev *dev)
 	skb_queue_purge(&local->tx_queue);
 	skb_queue_purge(&local->tx_queue);
 	destroy_workqueue(local->tx_wq);
 	destroy_workqueue(local->tx_wq);
 	destroy_workqueue(local->rx_wq);
 	destroy_workqueue(local->rx_wq);
-	kfree(local->rx_pending);
+	kfree_skb(local->rx_pending);
 	kfree(local);
 	kfree(local);
 }
 }