summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmds-qgroup.c5
-rw-r--r--qgroup.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/cmds-qgroup.c b/cmds-qgroup.c
index 0ad99f48..a64b7167 100644
--- a/cmds-qgroup.c
+++ b/cmds-qgroup.c
@@ -348,8 +348,11 @@ static int cmd_qgroup_show(int argc, char **argv)
path = argv[optind];
fd = btrfs_open_dir(path, &dirstream, 1);
- if (fd < 0)
+ if (fd < 0) {
+ btrfs_qgroup_free_filter_set(filter_set);
+ btrfs_qgroup_free_comparer_set(comparer_set);
return 1;
+ }
if (filter_flag) {
qgroupid = btrfs_get_path_rootid(fd);
diff --git a/qgroup.c b/qgroup.c
index 99fddead..1fbfcb97 100644
--- a/qgroup.c
+++ b/qgroup.c
@@ -1208,6 +1208,7 @@ int btrfs_show_qgroups(int fd,
__free_all_qgroups(&qgroup_lookup);
btrfs_qgroup_free_filter_set(filter_set);
+ btrfs_qgroup_free_comparer_set(comp_set);
return ret;
}