[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20110921071250.GE4999@elgon.mountain>
Date: Wed, 21 Sep 2011 10:12:50 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Asai Thambi S P <asamymuthupa@...ron.com>
Cc: Jens Axboe <jaxboe@...ionio.com>,
Sam Bradshaw <sbradshaw@...ron.com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] mtip32xx: double free if copy_from_user() fails
We call kfree(req_task) after we go to abort so it isn't needed here.
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists