projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ad134d
)
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
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 26 Jun 2017 05:13:08 +0000
(07:13 +0200)
commit
5cda3ee5138e91ac369ed9d0b55eab0dab077686
upstream.
This patch adds the missing kfree() in gs_cmd_reset() to free the
memory that is not used anymore after usb_control_msg().
Cc: Maximilian Schneider <max@schneidersoft.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/gs_usb.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/usb/gs_usb.c
b/drivers/net/can/usb/gs_usb.c
index cbc99d5649afa3877158a0ac37a50b8865a7e8ac..ae570935454654d534c2a81ccf3b4c859b5d5ec8 100644
(file)
--- a/
drivers/net/can/usb/gs_usb.c
+++ b/
drivers/net/can/usb/gs_usb.c
@@
-246,6
+246,8
@@
static int gs_cmd_reset(struct gs_usb *gsusb, struct gs_can *gsdev)
sizeof(*dm),
1000);
+ kfree(dm);
+
return rc;
}