lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ