summaryrefslogtreecommitdiff
path: root/drivers/net/can/usb
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2017-06-04 15:03:42 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2017-06-09 12:39:23 +0300
commit5cda3ee5138e91ac369ed9d0b55eab0dab077686 (patch)
tree65eaafa32c2607bcb15edf6fa89ca09bcdd78004 /drivers/net/can/usb
parentdadcd398b3f059a0aa9de1cac8030a1d5a3791a5 (diff)
downloadlinux-5cda3ee5138e91ac369ed9d0b55eab0dab077686.tar.xz
can: gs_usb: fix memory leak in gs_cmd_reset()
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>
Diffstat (limited to 'drivers/net/can/usb')
-rw-r--r--drivers/net/can/usb/gs_usb.c2
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 eecee7f8dfb7..afcc1312dbaf 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;
}