diff options
author | Anton Vasilyev <vasilyev@ispras.ru> | 2018-07-27 18:50:42 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2018-07-30 11:04:27 +0200 |
commit | 72c05f32f4a5055c9c8fe889bb6903ec959c0aad (patch) | |
tree | 23a4e4368faf6b12d2698f66a2ecf5f11bdc787d /drivers/net | |
parent | 25432eba9cd8f2ef5afef55be811b010a004b5fa (diff) | |
download | linux-stable-72c05f32f4a5055c9c8fe889bb6903ec959c0aad.tar.gz linux-stable-72c05f32f4a5055c9c8fe889bb6903ec959c0aad.tar.bz2 linux-stable-72c05f32f4a5055c9c8fe889bb6903ec959c0aad.zip |
can: ems_usb: Fix memory leak on ems_usb_disconnect()
ems_usb_probe() allocates memory for dev->tx_msg_buffer, but there
is no its deallocation in ems_usb_disconnect().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Cc: <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/can/usb/ems_usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 12ff0020ecd6..b7dfd4109d24 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -1072,6 +1072,7 @@ static void ems_usb_disconnect(struct usb_interface *intf) usb_free_urb(dev->intr_urb); kfree(dev->intr_in_buffer); + kfree(dev->tx_msg_buffer); } } |