Commit cf68f517 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: gs_usb: gs_destroy_candev(): fix use after free

This patch fixes a use after free of "dev" in gs_destroy_candev().
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 2a7ede54
......@@ -826,8 +826,8 @@ static void gs_destroy_candev(struct gs_can *dev)
{
unregister_candev(dev->netdev);
free_candev(dev->netdev);
kfree(dev);
usb_kill_anchored_urbs(&dev->tx_submitted);
kfree(dev);
}
static int gs_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment