* [patch] mtip32xx: double free if copy_from_user() fails
@ 2011-09-21 7:12 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-09-21 7:12 UTC (permalink / raw)
To: Asai Thambi S P; +Cc: Jens Axboe, Sam Bradshaw, linux-kernel, kernel-janitors
We call kfree(req_task) after we go to abort so it isn't needed here.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 847b8ff..0d23d8c 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -1674,7 +1674,6 @@ static int exec_drive_taskfile(struct driver_data *dd,
intotal = compat_tasksize + req_task->out_size;
} else {
if (copy_from_user(req_task, buf, tasksize)) {
- kfree(req_task);
err = -EFAULT;
goto abort;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-09-21 7:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-21 7:12 [patch] mtip32xx: double free if copy_from_user() fails Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox