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>
This commit is contained in:
parent
97aeb877de
commit
fc7dcd05f4
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user