summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthreadcreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/pthreadcreate.c')
-rw-r--r--cpukit/posix/src/pthreadcreate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
index d431c64a3e..33c5f8d03a 100644
--- a/cpukit/posix/src/pthreadcreate.c
+++ b/cpukit/posix/src/pthreadcreate.c
@@ -218,8 +218,10 @@ int pthread_create(
}
if ( config.stack_area == NULL ) {
+ config.stack_free = _Stack_Free;
config.stack_area = _Stack_Allocate( config.stack_size );
- config.allocated_stack = config.stack_area;
+ } else {
+ config.stack_free = _Stack_Free_nothing;
}
status = ( config.stack_area != NULL );