mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Ensure xNewLib_reent is reclaimed when a task is deleted.
This commit is contained in:
parent
82207ebffa
commit
6af9b013eb
|
@ -3086,8 +3086,13 @@ TCB_t *pxNewTCB;
|
||||||
want to allocate and clean RAM statically. */
|
want to allocate and clean RAM statically. */
|
||||||
portCLEAN_UP_TCB( pxTCB );
|
portCLEAN_UP_TCB( pxTCB );
|
||||||
|
|
||||||
/* Free up the memory allocated by the scheduler for the task. It is up to
|
/* Free up the memory allocated by the scheduler for the task. It is up
|
||||||
the task to free any memory allocated at the application level. */
|
to the task to free any memory allocated at the application level. */
|
||||||
|
#if ( configUSE_NEWLIB_REENTRANT == 1 )
|
||||||
|
{
|
||||||
|
_reclaim_reent( &( pxTCB->xNewLib_reent ) );
|
||||||
|
}
|
||||||
|
#endif /* configUSE_NEWLIB_REENTRANT */
|
||||||
vPortFreeAligned( pxTCB->pxStack );
|
vPortFreeAligned( pxTCB->pxStack );
|
||||||
vPortFree( pxTCB );
|
vPortFree( pxTCB );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue