From 79a851f143d58c4ab9f36753098ad95ddc3377bd Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 27 Jul 2015 16:16:52 +0200 Subject: [PATCH] btrfs-progs: qgroup assign: set path after checking argument count Signed-off-by: David Sterba --- cmds-qgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmds-qgroup.c b/cmds-qgroup.c index 6436e9c6..f2200b7e 100644 --- a/cmds-qgroup.c +++ b/cmds-qgroup.c @@ -37,7 +37,7 @@ static int qgroup_assign(int assign, int argc, char **argv) int ret = 0; int fd; int e; - char *path = argv[3]; + char *path; struct btrfs_ioctl_qgroup_assign_args args; DIR *dirstream = NULL; @@ -49,6 +49,8 @@ static int qgroup_assign(int assign, int argc, char **argv) args.src = parse_qgroupid(argv[1]); args.dst = parse_qgroupid(argv[2]); + path = argv[3]; + /* * FIXME src should accept subvol path */