mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 05:42:05 +08:00
mm/mm_heap/mm_sbrk.c: Fix backward conditional test. Should call mm_initialize() when brkaddr equal zero
This commit is contained in:
@@ -141,7 +141,7 @@ FAR void *mm_sbrk(FAR struct mm_heap_s *heap, intptr_t incr,
|
||||
*/
|
||||
|
||||
bytesize = pgincr << MM_PGSHIFT;
|
||||
if (brkaddr != 0)
|
||||
if (brkaddr == 0)
|
||||
{
|
||||
/* No... then initialize it now */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user