From 214ef6c8e771be552b5b6444e3c39081fc5553a0 Mon Sep 17 00:00:00 2001 From: ligd Date: Fri, 8 Jan 2021 20:50:52 +0800 Subject: [PATCH] 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 --- fs/inode/fs_files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c index e28685f21ca..31117cba39b 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.