diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2017-06-04 15:03:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-24 08:11:12 +0300 |
commit | 95f47cd7d7d8f40a1cc744a4a3116b44a43e6514 (patch) | |
tree | 74563bc8361d3d5792d721256a4b271f90d8f865 /drivers | |
parent | a6d6282040b7196a58fba47f89b05b560fadde2b (diff) | |
download | linux-95f47cd7d7d8f40a1cc744a4a3116b44a43e6514.tar.xz |
can: gs_usb: fix memory leak in gs_cmd_reset()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/can/usb/gs_usb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c index 7ab24c5262f3..05369dc9dd09 100644 --- 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; } |