From d1d08e41848a17cad3453512f1fa18d07d74cd5b Mon Sep 17 00:00:00 2001 From: Paul Bartell Date: Fri, 5 Mar 2021 11:22:08 -0800 Subject: [PATCH] Assert that the semaphore handle passed into xQueueGetMutexHolder is not NULL. --- queue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/queue.c b/queue.c index 4dd68ea4a..0ded0badb 100644 --- a/queue.c +++ b/queue.c @@ -563,6 +563,8 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength, TaskHandle_t pxReturn; Queue_t * const pxSemaphore = ( Queue_t * ) xSemaphore; + configASSERT( xSemaphore ); + /* This function is called by xSemaphoreGetMutexHolder(), and should not * be called directly. Note: This is a good way of determining if the * calling task is the mutex holder, but not a good way of determining the