summaryrefslogtreecommitdiff
path: root/c_src/cmd_attr.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-04-21 14:31:18 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-04-21 14:32:50 -0400
commit98f2c06d418d85557f39c6541295766457d68d53 (patch)
tree8fff82264d903b2a026ecf9ab18dd7b5a6792976 /c_src/cmd_attr.c
parent8873eb1d0bd9df1f8cfd6f4079255edceb6bb2a6 (diff)
fd fixes
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'c_src/cmd_attr.c')
-rw-r--r--c_src/cmd_attr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/c_src/cmd_attr.c b/c_src/cmd_attr.c
index 78df1be8..0fc21824 100644
--- a/c_src/cmd_attr.c
+++ b/c_src/cmd_attr.c
@@ -48,11 +48,11 @@ static void propagate_recurse(int dirfd)
continue;
}
propagate_recurse(fd);
- xclose(fd);
}
if (errno)
die("readdir error: %m");
+ closedir(dir);
}
static void do_setattr(char *path, struct bch_opt_strs opts)
@@ -80,7 +80,6 @@ static void do_setattr(char *path, struct bch_opt_strs opts)
die("error opening %s: %m", path);
propagate_recurse(dirfd);
- xclose(dirfd);
}
static void setattr_usage(void)