mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +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:
@@ -244,6 +244,12 @@ static inline BaseType_t xPortInIsrContext(void)
|
||||
return xPortCheckIfInISR();
|
||||
}
|
||||
|
||||
static inline void vPortAssertIfInISR(void)
|
||||
{
|
||||
/* Assert if the interrupt nesting count is > 0 */
|
||||
configASSERT(xPortInIsrContext() == 0);
|
||||
}
|
||||
|
||||
// xPortInterruptedFromISRContext() is only used in panic handler and core dump,
|
||||
// both probably not relevant on POSIX sim.
|
||||
//BaseType_t xPortInterruptedFromISRContext(void);
|
||||
@@ -301,7 +307,7 @@ extern void vPortCancelThread( void *pxTaskToDelete );
|
||||
* are always a full memory barrier. ISRs are emulated as signals
|
||||
* which also imply a full memory barrier.
|
||||
*
|
||||
* Thus, only a compilier barrier is needed to prevent the compiler
|
||||
* Thus, only a compiler barrier is needed to prevent the compiler
|
||||
* reordering.
|
||||
*/
|
||||
#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" )
|
||||
|
Reference in New Issue
Block a user