From 002d467ce4c19c902c9596d3f5d8dae6d2cf28ae Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 16 Jul 2026 19:21:48 +0100 Subject: [PATCH] shift-uid: use TAKE_FD on input fd Follow-up for c3eafb10a0b886876316bca6f9af06db67308ad0 --- src/shared/shift-uid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/shift-uid.c b/src/shared/shift-uid.c index e1c53dcb884..d01a4dad8dd 100644 --- a/src/shared/shift-uid.c +++ b/src/shared/shift-uid.c @@ -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; -- 2.47.3