Check NULL pointer input for vEventGroupDelete.

This commit is contained in:
mingyue86010 2021-03-24 16:46:40 -07:00
parent 4ad84923a0
commit d55f0934c3

View file

@ -625,8 +625,13 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
void vEventGroupDelete( EventGroupHandle_t xEventGroup )
{
EventGroup_t * pxEventBits = xEventGroup;
const List_t * pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
EventGroup_t * pxEventBits;
const List_t * pxTasksWaitingForBits;
if ( NULL != xEventGroup )
{
pxEventBits = xEventGroup;
pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
vTaskSuspendAll();
{
@ -663,6 +668,7 @@ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
}
( void ) xTaskResumeAll();
}
}
/*-----------------------------------------------------------*/
/* For internal use only - execute a 'set bits' command that was pended from