fix(freertos): Fixed memory leak issue in vTaskDeleteWithCaps()

vTaskDeleteWithCaps() leaked memory when a task uses the API to delete
itself. This commit adds a fix to avoid the memory leak.

Closes https://github.com/espressif/esp-idf/issues/14222
This commit is contained in:
Sudeep Mohanty
2024-07-23 16:19:24 +02:00
parent 7806aeb372
commit c3da2ace27
5 changed files with 207 additions and 15 deletions

View File

@@ -339,6 +339,11 @@ uint8_t * pxTaskGetStackStart( TaskHandle_t xTask );
* @brief Deletes a task previously created using xTaskCreateWithCaps() or
* xTaskCreatePinnedToCoreWithCaps()
*
* @note It is recommended to use this API to delete tasks from another task's
* context, rather than self-deletion. When the task is being deleted, it is vital
* to ensure that it is not running on another core. This API must not be called
* from an interrupt context.
*
* @param xTaskToDelete A handle to the task to be deleted
*/
void vTaskDeleteWithCaps( TaskHandle_t xTaskToDelete );