From 7ecfbcdaabac48e51d621ee4eb4d06a96516ee44 Mon Sep 17 00:00:00 2001 From: dongjiuzhu1 Date: Wed, 25 Jun 2025 17:51:14 +0800 Subject: [PATCH] fs/fs_files: restore fd before calling fdlist_install Signed-off-by: dongjiuzhu1 --- fs/inode/fs_files.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c index a4e027541f..bb1810e7aa 100644 --- a/fs/inode/fs_files.c +++ b/fs/inode/fs_files.c @@ -800,6 +800,10 @@ int fdlist_copy(FAR struct fdlist *plist, FAR struct fdlist *clist, file_put(filep); continue; } + +#ifdef CONFIG_FDCHECK + fd = fdcheck_restore(fd); +#endif } else if (fcloexec) {