Skip to content

Commit 9844959

Browse files
committed
Assert that the semaphore handle passed into xQueueGetMutexHolder is not NULL.
1 parent 8b95f11 commit 9844959

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

queue.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength,
563563
TaskHandle_t pxReturn;
564564
Queue_t * const pxSemaphore = ( Queue_t * ) xSemaphore;
565565

566+
configASSERT( xSemaphore );
567+
566568
/* This function is called by xSemaphoreGetMutexHolder(), and should not
567569
* be called directly. Note: This is a good way of determining if the
568570
* calling task is the mutex holder, but not a good way of determining the

0 commit comments

Comments
 (0)