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 2022/08/26 08:43:39 UTC

[GitHub] [incubator-nuttx] michi-jung commented on a diff in pull request #6928: tmpfs: Avoid potential kmm_free(NULL)

michi-jung commented on code in PR #6928:
URL: https://github.com/apache/incubator-nuttx/pull/6928#discussion_r955809453


##########
fs/tmpfs/fs_tmpfs.c:
##########
@@ -1442,7 +1442,11 @@ static int tmpfs_close(FAR struct file *filep)
        * have any other references.
        */
 
-      kmm_free(tfo->tfo_data);

Review Comment:
   It is this line that is causing the assertion violation: [kmm_free.c:55](https://github.com/apache/incubator-nuttx/blob/77a99acc98737a9e38694fa8270de806b4087e53/mm/kmm_heap/kmm_free.c#L55).  Perhaps it should be`DEBUGASSERT((mem == NULL) || kmm_heapmember(mem));`?



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