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; }