mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
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:
@@ -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
|
||||
*/
|
||||
@@ -104,6 +104,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()
|
||||
|
||||
#if CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP
|
||||
/* If enabled, users must provide an implementation of vPortCleanUpTCB() */
|
||||
extern void vPortCleanUpTCB ( void *pxTCB );
|
||||
|
Reference in New Issue
Block a user