diff --git a/portable/MemMang/heap_2.c b/portable/MemMang/heap_2.c index 950148994..e132ae3ea 100644 --- a/portable/MemMang/heap_2.c +++ b/portable/MemMang/heap_2.c @@ -134,7 +134,7 @@ void * pvPortMalloc( size_t xWantedSize ) /* The wanted size must be increased so it can contain a BlockLink_t * structure in addition to the requested amount of bytes. */ if( ( xWantedSize > 0 ) && - ( ( xWantedSize + xHeapStructSize ) > xWantedSize ) ) /* Overflow check */ + ( ( xWantedSize + heapSTRUCT_SIZE ) > xWantedSize ) ) /* Overflow check */ { xWantedSize += heapSTRUCT_SIZE;