From: rtel Date: Wed, 9 Apr 2014 09:07:19 +0000 (+0000) Subject: Ensure xNewLib_reent is reclaimed when a task is deleted. X-Git-Tag: V8.0.1~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5e09cf7373e124091e3cf692f43cb0250c21afb7;p=freertos Ensure xNewLib_reent is reclaimed when a task is deleted. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2234 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c index c20aeed54..60d62b09a 100644 --- a/FreeRTOS/Source/tasks.c +++ b/FreeRTOS/Source/tasks.c @@ -3086,8 +3086,13 @@ TCB_t *pxNewTCB; want to allocate and clean RAM statically. */ portCLEAN_UP_TCB( pxTCB ); - /* Free up the memory allocated by the scheduler for the task. It is up to - the task to free any memory allocated at the application level. */ + /* Free up the memory allocated by the scheduler for the task. It is up + 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 ); vPortFree( pxTCB ); }