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 <novikov@ispras.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
df3a97bdbc
commit
c3800eed22
@ -173,6 +173,7 @@ static void thrustmaster_interrupts(struct hid_device *hdev)
|
||||
|
||||
if (ret) {
|
||||
hid_err(hdev, "setup data couldn't be sent\n");
|
||||
kfree(send_buf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user