fs/inode/fs_files.c: fix DEBUGASSERT in romfs

up_assert: Assertion failed at file:romfs/fs_romfs.c line: 643

newp->f_priv should be NULL.

Change-Id: I5f72b1329a8938ce39cf1ac5fbee561ca106f4f6
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2021-01-08 20:50:52 +08:00 committed by Xiang Xiao
parent 1aa69f4c73
commit e772be8c8a
1 changed files with 1 additions and 1 deletions

View File

@ -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.