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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux