* [PATCH] debugfs : Fix memory leaks in do_ncheck()
@ 2008-09-03 5:53 Manish Katiyar
2008-09-05 12:37 ` Theodore Tso
0 siblings, 1 reply; 2+ messages in thread
From: Manish Katiyar @ 2008-09-03 5:53 UTC (permalink / raw)
To: linux-ext4, Theodore Tso
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@gmail.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-05 14:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-03 5:53 [PATCH] debugfs : Fix memory leaks in do_ncheck() Manish Katiyar
2008-09-05 12:37 ` Theodore Tso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox