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]
Message-ID: <ea11fea30809022253x6b8a493bkf7c92032c1cf479c@mail.gmail.com>
Date:	Wed, 3 Sep 2008 11:23:53 +0530
From:	"Manish Katiyar" <mkatiyar@...il.com>
To:	linux-ext4@...r.kernel.org, "Theodore Tso" <tytso@....edu>
Subject: [PATCH] debugfs : Fix memory leaks in do_ncheck()

Below patch fixes memory leaks in do_ncheck(). Also use this
opportunity to fix the progname printed as "ncheck" instead of
"do_ncheck" since all other messages
in this file do so.


Signed-off-by: "Manish Katiyar" <mkatiyar@...il.com>

---
 debugfs/ncheck.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debugfs/ncheck.c b/debugfs/ncheck.c
index 3381dd9..22529c4 100644
--- a/debugfs/ncheck.c
+++ b/debugfs/ncheck.c
@@ -76,7 +76,7 @@ void do_ncheck(int argc, char **argv)

 	iw.iarray = malloc(sizeof(struct inode_info) * argc);
 	if (!iw.iarray) {
-		com_err("do_ncheck", ENOMEM,
+		com_err("ncheck", ENOMEM,
 			"while allocating inode info array");
 		return;
 	}
@@ -86,7 +86,7 @@ void do_ncheck(int argc, char **argv)
 		iw.iarray[i-1].ino = strtol(argv[i], &tmp, 0);
 		if (*tmp) {
 			com_err(argv[0], 0, "Bad inode - %s", argv[i]);
-			return;
+			goto error_out;
 		}
 	}

-- 
1.5.4.3


Thanks -
Manish
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ