BufferAllocation_2.c : extra check in xNetworkBufferSemaphore()
@@ -210,6 +210,8 @@ NetworkBufferDescriptor_t *pxGetNetworkBufferWithDescriptor( size_t xRequestedSi
NetworkBufferDescriptor_t *pxReturn = NULL;
size_t uxCount;
+ if( xNetworkBufferSemaphore != NULL )
+ {
if( ( xRequestedSizeBytes != 0u ) && ( xRequestedSizeBytes < ( size_t ) baMINIMAL_BUFFER_SIZE ) )
{
/* ARP packets can replace application packets, so the storage must be
@@ -287,6 +289,7 @@ size_t uxCount;
allocated. */
}
}
+ }
if( pxReturn == NULL )
{
