[PATCH 2/2] btrfs-progs: mid flight return leaks memory during filesystem show mnt

Anand Jain
2014-01-14T11:07:56Z

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