mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
can: gs_usb: fix memory leak in gs_cmd_reset()
commit 5cda3ee513 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>
This commit is contained in:
parent
0ad134d81c
commit
58ab7a86cd
|
|
@ -246,6 +246,8 @@ static int gs_cmd_reset(struct gs_usb *gsusb, struct gs_can *gsdev)
|
|||
sizeof(*dm),
|
||||
1000);
|
||||
|
||||
kfree(dm);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user