diff options
author | Evgeny Novikov <novikov@ispras.ru> | 2021-07-30 19:51:09 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2021-08-20 15:24:57 +0300 |
commit | df3a97bdbc252d3421f1c5d6d713ad6e4f36a469 (patch) | |
tree | c8750de7f2a2543377659b5992a3e2533017df0f /drivers/hid | |
parent | d0f1d5ae23803bd82647a337fa508fa8615defc5 (diff) | |
download | linux-df3a97bdbc252d3421f1c5d6d713ad6e4f36a469.tar.xz |
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.c | 1 |
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); |