diff options
author | rtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2> | 2014-04-09 09:07:19 +0000 |
---|---|---|
committer | rtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2> | 2014-04-09 09:07:19 +0000 |
commit | f0c17694adbe9dc7c85f745734ac5402eff1354b (patch) | |
tree | 7ec9665d1e74c86e13c661646086de1547e063f9 | |
parent | 26371a5b292773fbc7448d59ed6c13c9d92fd4e5 (diff) | |
download | freertos-f0c17694adbe9dc7c85f745734ac5402eff1354b.tar.gz |
Ensure xNewLib_reent is reclaimed when a task is deleted.
git-svn-id: http://svn.code.sf.net/p/freertos/code/trunk@2234 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
-rw-r--r-- | FreeRTOS/Source/tasks.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 );
}
|