summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorEvgeny Novikov <novikov@ispras.ru>2021-07-30 18:51:09 +0200
committerJiri Kosina <jkosina@suse.cz>2021-08-20 14:24:57 +0200
commitdf3a97bdbc252d3421f1c5d6d713ad6e4f36a469 (patch)
treec8750de7f2a2543377659b5992a3e2533017df0f /drivers/hid
parentHID: thrustmaster: Fix memory leaks in probe (diff)
downloadlinux-df3a97bdbc252d3421f1c5d6d713ad6e4f36a469.tar.xz
linux-df3a97bdbc252d3421f1c5d6d713ad6e4f36a469.zip
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-thrustmaster.c1
1 files changed, 1 insertions, 0 deletions
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);