diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-03-11 12:27:43 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-03-13 09:45:35 +0100 |
commit | fc7dcd05f4c2660cf665bb1c2b9cd82e8d9d8bd8 (patch) | |
tree | 750b236462e2dc8407ea85b0295ab3880f1f8437 /drivers | |
parent | 97aeb877de7f14f819fc2cf8388d7a2d8090489d (diff) |
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')
-rw-r--r-- | drivers/net/can/vxcan.c | 2 |
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; } |