jlaitine commented on code in PR #8075: URL: https://github.com/apache/nuttx/pull/8075#discussion_r1068085142
########## fs/mmap/fs_mmap.c: ########## @@ -272,11 +252,11 @@ int file_mmap(FAR struct file *filep, FAR void *start, size_t length, FAR void *mmap(FAR void *start, size_t length, int prot, int flags, int fd, off_t offset) { - FAR struct file *filep; + FAR struct file *filep = NULL; FAR void *mapped; int ret; - if (fs_getfilep(fd, &filep) < 0) + if (fd != -1 && fs_getfilep(fd, &filep) < 0) Review Comment: of course, my bad -- 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