From: Evgeny Novikov Date: Fri, 30 Jul 2021 16:51:09 +0000 (+0300) Subject: HID: thrustmaster: Fix memory leak in remove X-Git-Tag: microblaze-v5.16~111^2~2^2~1 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=df3a97bdbc252d3421f1c5d6d713ad6e4f36a469;p=linux-2.6-microblaze.git 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c index e94d3409fd10..9cb4248f95af 100644 --- a/drivers/hid/hid-thrustmaster.c +++ b/drivers/hid/hid-thrustmaster.c @@ -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);