[prev in list] [next in list] [prev in thread] [next in thread]
List: linux1394-devel
Subject: [PATCH 2/5] firewire: cdev: fix another memory leak in an error path
From: Stefan Richter <stefanr () s5r6 ! in-berlin ! de>
Date: 2009-12-26 0:34:29
Message-ID: tkrat.22fe3865dde96d48 () s5r6 ! in-berlin ! de
[Download RAW message or body]
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>
---
drivers/firewire/core-cdev.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6.33-rc2/drivers/firewire/core-cdev.c
===================================================================
--- linux-2.6.33-rc2.orig/drivers/firewire/core-cdev.c
+++ linux-2.6.33-rc2/drivers/firewire/core-cdev.c
@@ -723,6 +723,7 @@ static int ioctl_send_response(struct cl
if (copy_from_user(r->data, u64_to_uptr(request->data),
r->length)) {
ret = -EFAULT;
+ kfree(r->request);
goto out;
}
fw_send_response(client->device->card, r->request,
--
Stefan Richter
-=====-==--= ==-- ==-=-
http://arcgraph.de/sr/
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
mailing list linux1394-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux1394-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic