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@xxxxxxxxx> --- 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html