Skip to content

Commit c3800ee

Browse files
eunovmJiri Kosina
authored andcommitted
HID: thrustmaster: Fix memory leak in thrustmaster_interrupts()
thrustmaster_interrupts() does not free memory for send_buf when usb_interrupt_msg() fails. This is fixed by the given 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 df3a97b commit c3800ee

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
@@ -173,6 +173,7 @@ static void thrustmaster_interrupts(struct hid_device *hdev)
173173

174174
if (ret) {
175175
hid_err(hdev, "setup data couldn't be sent\n");
176+
kfree(send_buf);
176177
return;
177178
}
178179
}

0 commit comments

Comments
 (0)