From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 2/2] btrfs-progs: mid flight return leaks memory during filesystem show mnt
Date: Tue, 14 Jan 2014 19:17:08 +0800 [thread overview]
Message-ID: <1389698228-9580-2-git-send-email-anand.jain@oracle.com> (raw)
In-Reply-To: <1389698228-9580-1-git-send-email-anand.jain@oracle.com>
since now handle_print()->print_one_fs() calls add_seen_fsid()
the thread has to go through free_seen_fsid()
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
cmds-filesystem.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index ee6cc84..d38fae6 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -681,10 +681,11 @@ static int cmd_show(int argc, char **argv)
}
} else if (type == BTRFS_ARG_MNTPOINT) {
char label[BTRFS_LABEL_SIZE];
- if (get_label_mounted(search, label))
+ ret = get_label_mounted(search, label);
+ if (ret)
return 1;
handle_print(search, label);
- return 0;
+ goto out;
}
}
--
1.7.1
prev parent reply other threads:[~2014-01-14 11:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 11:17 [PATCH 1/2] btrfs-progs: return non zero when label is not found Anand Jain
2014-01-14 11:17 ` Anand Jain [this message]
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=1389698228-9580-2-git-send-email-anand.jain@oracle.com \
--to=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/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