Use kfree_skb() instead of kfree() to free sk_buff.
Signed-off-by: Yang Yingliang <[email protected]>
---
net/mctp/test/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mctp/test/utils.c b/net/mctp/test/utils.c
index cc6b8803aa9d..7b7918702592 100644
--- a/net/mctp/test/utils.c
+++ b/net/mctp/test/utils.c
@@ -12,7 +12,7 @@
static netdev_tx_t mctp_test_dev_tx(struct sk_buff *skb,
struct net_device *ndev)
{
- kfree(skb);
+ kfree_skb(skb);
return NETDEV_TX_OK;
}
--
2.25.1
Hi Yang,
> Use kfree_skb() instead of kfree() to free sk_buff.
Thanks for the patch! We do already have this queued in -net though:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=d85195654470
(which should percolate to net-next in due course too).
Cheers,
Jeremy