Commit cf0e575d authored by Stefan Richter's avatar Stefan Richter

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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent db5d247a
...@@ -723,6 +723,7 @@ static int ioctl_send_response(struct client *client, void *buffer) ...@@ -723,6 +723,7 @@ static int ioctl_send_response(struct client *client, void *buffer)
if (copy_from_user(r->data, u64_to_uptr(request->data), if (copy_from_user(r->data, u64_to_uptr(request->data),
r->length)) { r->length)) {
ret = -EFAULT; ret = -EFAULT;
kfree(r->request);
goto out; goto out;
} }
fw_send_response(client->device->card, r->request, fw_send_response(client->device->card, r->request,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment