HID: thrustmaster: Fix memory leak in remove

thrustmaster_remove() does not release memory for
tm_wheel->change_request. This is fixed by the patch.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Evgeny Novikov 2021-07-30 19:51:09 +03:00 committed by Jiri Kosina
parent d0f1d5ae23
commit df3a97bdbc

View File

@ -253,6 +253,7 @@ static void thrustmaster_remove(struct hid_device *hdev)
usb_kill_urb(tm_wheel->urb);
kfree(tm_wheel->change_request);
kfree(tm_wheel->response);
kfree(tm_wheel->model_request);
usb_free_urb(tm_wheel->urb);