yamt commented on code in PR #5991:
URL: https://github.com/apache/incubator-nuttx/pull/5991#discussion_r844863875


##########
mm/mm_heap/mm_malloc.c:
##########
@@ -256,5 +256,6 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
     }
 #endif
 
+  DEBUGASSERT(ret == NULL || ((uintptr_t)ret) % MM_MIN_CHUNK == 0);

Review Comment:
   ret can be NULL here and arithmetics on NULL is evil.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to