You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2023/01/16 12:44:32 UTC

[GitHub] [nuttx] jlaitine commented on a diff in pull request #8138: fs/mmap: fix mmap returned address

jlaitine commented on code in PR #8138:
URL: https://github.com/apache/nuttx/pull/8138#discussion_r1071200247


##########
fs/mmap/fs_rammap.c:
##########
@@ -235,7 +237,6 @@ int rammap(FAR struct file *filep, FAR struct mm_map_entry_s *entry,
 
   /* Add the buffer to the list of regions */
 
-  entry->vaddr = rdbuffer;
   entry->priv.i = kernel;
   entry->munmap = unmap_rammap;
 

Review Comment:
   the next ret check with goto errout_with_region is actually wrong as well; the pointer to rdbuffer is no longer pointing to the allocated area, but is still freed there



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org