projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25432eb
)
can: ems_usb: Fix memory leak on ems_usb_disconnect()
author
Anton Vasilyev
<vasilyev@ispras.ru>
Fri, 27 Jul 2018 15:50:42 +0000
(18:50 +0300)
committer
Marc Kleine-Budde
<mkl@pengutronix.de>
Mon, 30 Jul 2018 09:04:27 +0000
(11:04 +0200)
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>
drivers/net/can/usb/ems_usb.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/usb/ems_usb.c
b/drivers/net/can/usb/ems_usb.c
index 12ff0020ecd60904b65b89a633cd2a60bf880ed2..b7dfd4109d24ef3db5c03d78fb078f7f7cf6e3ab 100644
(file)
--- 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);
}
}