summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/vxcan.c
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2022-03-11 12:27:43 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2022-03-13 09:45:35 +0100
commitfc7dcd05f4c2660cf665bb1c2b9cd82e8d9d8bd8 (patch)
tree750b236462e2dc8407ea85b0295ab3880f1f8437 /drivers/net/can/vxcan.c
parentMerge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/... (diff)
downloadlinux-fc7dcd05f4c2660cf665bb1c2b9cd82e8d9d8bd8.tar.xz
linux-fc7dcd05f4c2660cf665bb1c2b9cd82e8d9d8bd8.zip
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 <socketcan@hartkopp.net> Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/vxcan.c')
-rw-r--r--drivers/net/can/vxcan.c2
1 files changed, 1 insertions, 1 deletions
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;
}