shift-uid: use TAKE_FD on input fd

Follow-up for c3eafb10a0
This commit is contained in:
Luca Boccassi
2026-07-16 19:21:48 +01:00
parent 305393135b
commit 002d467ce4

View File

@@ -297,7 +297,7 @@ static int is_fs_fully_userns_compatible(const struct statfs *sfs) {
static int recurse_fd(int input_fd, const struct stat *st, uid_t shift, bool is_toplevel) {
_cleanup_closedir_ DIR *d = NULL;
_cleanup_close_ int fd = input_fd;
_cleanup_close_ int fd = TAKE_FD(input_fd);
bool changed = false;
struct statfs sfs;
int r;