From: "Manish Katiyar" <mkatiyar@gmail.com>
To: linux-ext4@vger.kernel.org, "Theodore Tso" <tytso@mit.edu>
Subject: [PATCH] debugfs : Fix memory leaks in do_ncheck()
Date: Wed, 3 Sep 2008 11:23:53 +0530 [thread overview]
Message-ID: <ea11fea30809022253x6b8a493bkf7c92032c1cf479c@mail.gmail.com> (raw)
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
next reply other threads:[~2008-09-03 5:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 5:53 Manish Katiyar [this message]
2008-09-05 12:37 ` [PATCH] debugfs : Fix memory leaks in do_ncheck() Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ea11fea30809022253x6b8a493bkf7c92032c1cf479c@mail.gmail.com \
--to=mkatiyar@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox