summaryrefslogtreecommitdiff
path: root/cmds-qgroup.c
diff options
context:
space:
mode:
authorZach Brown <zab@redhat.com>2013-01-23 15:00:46 -0800
committerZach Brown <zab@redhat.com>2013-02-05 16:09:40 -0800
commit7b3f63be2c3c821ffbea83dead0cbac969ae388e (patch)
treeba7a85d3fbabb484830c23aeed12afbeb5e98ff2 /cmds-qgroup.c
parent6ea327567fea05bb91230deb0d80b9c285158e4f (diff)
btrfs-progs: close fd in qgroup show
It wasn't closed in the error path. Signed-off-by: Zach Brown <zab@redhat.com>
Diffstat (limited to 'cmds-qgroup.c')
-rw-r--r--cmds-qgroup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmds-qgroup.c b/cmds-qgroup.c
index 085881f3..26f0ab09 100644
--- a/cmds-qgroup.c
+++ b/cmds-qgroup.c
@@ -315,13 +315,12 @@ static int cmd_qgroup_show(int argc, char **argv)
}
ret = list_qgroups(fd);
+ close(fd);
if (ret < 0) {
fprintf(stderr, "ERROR: can't list qgroups\n");
return 30;
}
- close(fd);
-
return ret;
}