Commit 78d6ef26 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Luis Henriques

can: esd_usb2: fix memory leak on disconnect

commit efbd50d2 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: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: default avatarMatthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 799312a2
...@@ -1143,6 +1143,7 @@ static void esd_usb2_disconnect(struct usb_interface *intf) ...@@ -1143,6 +1143,7 @@ static void esd_usb2_disconnect(struct usb_interface *intf)
} }
} }
unlink_all_urbs(dev); unlink_all_urbs(dev);
kfree(dev);
} }
} }
......
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