mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
can: esd_usb2: fix memory leak on disconnect
commit efbd50d2f6 upstream.
It seems struct esd_usb2 dev is not deallocated on disconnect. The patch adds
the missing deallocation.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
377ffbbeda
commit
b248afd9f2
@@ -1132,6 +1132,7 @@ static void esd_usb2_disconnect(struct usb_interface *intf)
|
||||
}
|
||||
}
|
||||
unlink_all_urbs(dev);
|
||||
kfree(dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user