acassis commented on code in PR #8194: URL: https://github.com/apache/nuttx/pull/8194#discussion_r1082431352
########## fs/inode/fs_files.c: ########## @@ -298,7 +301,10 @@ int files_duplist(FAR struct filelist *plist, FAR struct filelist *clist) #endif filep = &plist->fl_files[i][j]; - if (filep->f_inode == NULL || (filep->f_oflags & O_CLOEXEC) != 0) + DEBUGASSERT(filep); + + if (filep && (filep->f_inode == NULL || + (filep->f_oflags & O_CLOEXEC) != 0)) Review Comment: Actually the original fix as only that "if (filep && (...))", I added the DEBUGASSET later because it will avoid some silent issue that could happen in some cases. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org