projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dadcd39
)
can: gs_usb: fix memory leak in gs_cmd_reset()
author
Marc Kleine-Budde
<mkl@pengutronix.de>
Sun, 4 Jun 2017 12:03:42 +0000
(14:03 +0200)
committer
Marc Kleine-Budde
<mkl@pengutronix.de>
Fri, 9 Jun 2017 09:39:23 +0000
(11:39 +0200)
This patch adds the missing kfree() in gs_cmd_reset() to free the
memory that is not used anymore after usb_control_msg().
Cc: linux-stable <stable@vger.kernel.org>
Cc: Maximilian Schneider <max@schneidersoft.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/gs_usb.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/can/usb/gs_usb.c
b/drivers/net/can/usb/gs_usb.c
index eecee7f8dfb70763aa0e7c3f90f85ae66ff85385..afcc1312dbaf8f67bce640e17dbc20c06592dc45 100644
(file)
--- a/
drivers/net/can/usb/gs_usb.c
+++ b/
drivers/net/can/usb/gs_usb.c
@@
-265,6
+265,8
@@
static int gs_cmd_reset(struct gs_usb *gsusb, struct gs_can *gsdev)
sizeof(*dm),
1000);
+ kfree(dm);
+
return rc;
}