diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c index 8729f48e19b..93ee0377854 100644 --- a/fs/inode/fs_files.c +++ b/fs/inode/fs_files.c @@ -507,6 +507,9 @@ int files_duplist(FAR struct filelist *plist, FAR struct filelist *clist, if (actions != NULL) { +#ifdef CONFIG_FDCHECK + fd = fdcheck_protect(fd); +#endif if (!spawn_file_is_duplicateable(actions, fd, fcloexec)) { continue;