mempool:fix bug for realloc when shortage of memory
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
01741a0b65
commit
267976e5a8
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user