mempool:fix bug for realloc when shortage of memory

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2023-02-07 12:40:03 +08:00 committed by Xiang Xiao
parent 01741a0b65
commit 267976e5a8

View File

@ -103,8 +103,9 @@ FAR void *mm_realloc(FAR struct mm_heap_s *heap, FAR void *oldmem,
{ {
memcpy(newmem, oldmem, size); memcpy(newmem, oldmem, size);
mm_free(heap, oldmem); mm_free(heap, oldmem);
return newmem;
} }
return newmem;
} }
#endif #endif