patacongo commented on code in PR #9151:
URL: https://github.com/apache/nuttx/pull/9151#discussion_r1182657939
##########
mm/umm_heap/umm_realloc.c:
##########
@@ -83,7 +77,7 @@ FAR void *realloc(FAR void *oldmem, size_t size)
mem = mm_realloc(USR_HEAP, oldmem, size);
if (!mem)
{
- brkaddr = sbrk(size);
+ brkaddr = sbrk(size < 1 ? 1 : size);
Review Comment:
The actual size needed is actually larger than one when size is zero: It is
the minimum chunk size.
--
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]