Skip to content

Commit cf0e575

Browse files
author
Stefan Richter
committed
firewire: cdev: fix another memory leak in an error path
If copy_from_user in an FW_CDEV_IOC_SEND_RESPONSE ioctl failed, the fw_request pointed to by the inbound_transaction_resource is no longer referenced and needs to be freed. Signed-off-by: Stefan Richter <[email protected]>
1 parent db5d247 commit cf0e575

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/firewire/core-cdev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@ static int ioctl_send_response(struct client *client, void *buffer)
723723
if (copy_from_user(r->data, u64_to_uptr(request->data),
724724
r->length)) {
725725
ret = -EFAULT;
726+
kfree(r->request);
726727
goto out;
727728
}
728729
fw_send_response(client->device->card, r->request,

0 commit comments

Comments
 (0)