[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <BF571719A4041A478005EF3F08EA6DF004332395@pcsmail03.pcs.pc.ome.toshiba.co.jp>
Date: Thu, 26 Apr 2007 15:27:31 +0900
From: "Tomita, Haruo" <haruo.tomita@...hiba.co.jp>
To: <prarit@...hat.com>, <jbeulich@...ell.com>
Cc: "lkml" <linux-kernel@...r.kernel.org>,
"Tomita, Haruo" <haruo.tomita@...hiba.co.jp>
Subject: [PATCH 1/2] Fix the memory leak Intel RNG driver for 2.6.21-rc7-mm1
This patch fixes a memory leak in mod_init().
In the error, intel_rng_hw was freed.
intel-rng.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- linux-2.6.21-rc7-mm1/drivers/char/hw_random/intel-rng.c.orig 2007-04-26 11:56:03.000000000 +0900
+++ linux-2.6.21-rc7-mm1/drivers/char/hw_random/intel-rng.c 2007-04-26 13:39:50.000000000 +0900
@@ -345,11 +345,11 @@ static int __init mod_init(void)
}
err = intel_init_hw_struct(intel_rng_hw, dev);
- if (err == -ENODEV) {
- pci_dev_put(dev);
- goto fwh_done;
- } else if (err < 0) {
+ if (err) {
pci_dev_put(dev);
+ kfree(intel_rng_hw);
+ if (err == -ENODEV)
+ goto fwh_done;
goto out;
}
-
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