diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c index a4e027541f9..bb1810e7aa0 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) {