diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c index e28685f21c..31117cba39 100644 --- a/fs/inode/fs_files.c +++ b/fs/inode/fs_files.c @@ -184,7 +184,7 @@ int file_dup2(FAR struct file *filep1, FAR struct file *filep2) temp.f_oflags = filep1->f_oflags; temp.f_pos = filep1->f_pos; temp.f_inode = inode; - temp.f_priv = filep1->f_priv; + temp.f_priv = NULL; /* Call the open method on the file, driver, mountpoint so that it * can maintain the correct open counts.