summaryrefslogtreecommitdiff
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r--cmds-subvolume.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 0c5b6038..0bd76f2e 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -354,6 +354,9 @@ out:
cnt++;
if (cnt < argc) {
close_file_or_dir(fd, dirstream);
+ /* avoid double free */
+ fd = -1;
+ dirstream = NULL;
goto again;
}