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
committed by BOT
parent ed4220c163
commit a6a5ca31cc
4 changed files with 205 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -95,6 +95,17 @@ static inline BaseType_t xPortInIsrContext(void)
return xPortCheckIfInISR();
}
static inline void vPortAssertIfInISR(void)
{
/* Assert if the interrupt nesting count is > 0 */
configASSERT(xPortInIsrContext() == 0);
}
/**
* @brief Assert if in ISR context
*/
#define portASSERT_IF_IN_ISR() vPortAssertIfInISR()
#ifdef __cplusplus
}
#endif