summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2014-10-11 00:31:07 +0400
committerMarc Kleine-Budde <mkl@pengutronix.de>2014-11-18 13:23:31 +0100
commitefbd50d2f62fc1f69a3dcd153e63ba28cc8eb27f (patch)
tree0edef3105472e0fba7c71c2c64a86db34d804d6f /drivers
parent98e69016a11b2b9398bea668442193b3b362cd43 (diff)
can: esd_usb2: fix memory leak on disconnect
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> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/can/usb/esd_usb2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c
index b7c9e8b1146..7a90075529c 100644
--- a/drivers/net/can/usb/esd_usb2.c
+++ b/drivers/net/can/usb/esd_usb2.c
@@ -1143,6 +1143,7 @@ static void esd_usb2_disconnect(struct usb_interface *intf)
}
}
unlink_all_urbs(dev);
+ kfree(dev);
}
}