Skip to content

Commit df3a97b

Browse files
eunovmJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent d0f1d5a commit df3a97b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hid/hid-thrustmaster.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ static void thrustmaster_remove(struct hid_device *hdev)
253253

254254
usb_kill_urb(tm_wheel->urb);
255255

256+
kfree(tm_wheel->change_request);
256257
kfree(tm_wheel->response);
257258
kfree(tm_wheel->model_request);
258259
usb_free_urb(tm_wheel->urb);

0 commit comments

Comments
 (0)