From: Luca Boccassi Date: Thu, 16 Jul 2026 18:21:48 +0000 (+0100) Subject: shift-uid: use TAKE_FD on input fd X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=002d467ce4c19c902c9596d3f5d8dae6d2cf28ae;p=thirdparty%2Fsystemd.git shift-uid: use TAKE_FD on input fd Follow-up for c3eafb10a0b886876316bca6f9af06db67308ad0 --- 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;