diff --git a/source/FreeRTOS_IP_Utils.c b/source/FreeRTOS_IP_Utils.c index 5715dcad59..eb20e62327 100644 --- a/source/FreeRTOS_IP_Utils.c +++ b/source/FreeRTOS_IP_Utils.c @@ -1850,7 +1850,8 @@ uint16_t usChar2u16( const uint8_t * pucPtr ) if( xNetworkGoingUp == pdTRUE ) { /* We will need an MLD report structure a few lines down, so allocate one. */ - if( NULL == ( pxMRD = ( MCastReportData_t * ) pvPortMalloc( sizeof( MCastReportData_t ) ) ) ) + pxMRD = ( MCastReportData_t * ) pvPortMalloc( sizeof( MCastReportData_t ) ); + if( NULL == pxMRD ) { break; }