From fc7dcd05f4c2660cf665bb1c2b9cd82e8d9d8bd8 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Fri, 11 Mar 2022 12:27:43 +0100 Subject: can: vxcan: vxcan_xmit(): use kfree_skb() instead of kfree() to free skb This patch fixes the freeing of the "oskb", by using kfree_skb() instead of kfree(). Fixes: 1574481bb3de ("vxcan: remove sk reference in peer skb") Link: https://lore.kernel.org/all/20220311123741.382618-1-mkl@pengutronix.de Cc: Oliver Hartkopp Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Marc Kleine-Budde --- drivers/net/can/vxcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/can/vxcan.c') diff --git a/drivers/net/can/vxcan.c b/drivers/net/can/vxcan.c index 94a0c9c6a509..577a80300514 100644 --- a/drivers/net/can/vxcan.c +++ b/drivers/net/can/vxcan.c @@ -57,7 +57,7 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *oskb, struct net_device *dev) if (skb) { consume_skb(oskb); } else { - kfree(oskb); + kfree_skb(oskb); goto out_unlock; } -- cgit v1.2.3