aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2009-12-25 19:34:29 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-12-29 13:58:16 -0500
commitcf0e575dcc4cab9fd955e9bec49df7e8ee30a7cf (patch)
tree5f0e2a2c57aa2ca999d118d1dee7d84c71d1ecde /drivers
parentdb5d247ae811f49185a71e703b65acad845e4b18 (diff)
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 <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firewire/core-cdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
index 2cb22d160f6e..e6d63849e78e 100644
--- a/drivers/firewire/core-cdev.c
+++ b/drivers/firewire/core-cdev.c
@@ -723,6 +723,7 @@ static int ioctl_send_response(struct client *client, void *buffer)
723 if (copy_from_user(r->data, u64_to_uptr(request->data), 723 if (copy_from_user(r->data, u64_to_uptr(request->data),
724 r->length)) { 724 r->length)) {
725 ret = -EFAULT; 725 ret = -EFAULT;
726 kfree(r->request);
726 goto out; 727 goto out;
727 } 728 }
728 fw_send_response(client->device->card, r->request, 729 fw_send_response(client->device->card, r->request,