summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc_r/uthread/uthread_fork.c5
-rw-r--r--lib/libkse/thread/thr_fork.c5
-rw-r--r--lib/libpthread/thread/thr_fork.c5
3 files changed, 9 insertions, 6 deletions
diff --git a/lib/libc_r/uthread/uthread_fork.c b/lib/libc_r/uthread/uthread_fork.c
index d56f98d..960c1de 100644
--- a/lib/libc_r/uthread/uthread_fork.c
+++ b/lib/libc_r/uthread/uthread_fork.c
@@ -103,15 +103,16 @@ fork(void)
pthread->nxt = NULL;
} else {
if (pthread->attr.stackaddr_attr ==
- NULL && pthread->stack != NULL) {
+ NULL && pthread->stack != NULL)
/*
* Free the stack of the
* dead thread:
*/
free(pthread->stack);
- }
+
if (pthread->specific_data != NULL)
free(pthread->specific_data);
+
free(pthread);
}
diff --git a/lib/libkse/thread/thr_fork.c b/lib/libkse/thread/thr_fork.c
index d56f98d..960c1de 100644
--- a/lib/libkse/thread/thr_fork.c
+++ b/lib/libkse/thread/thr_fork.c
@@ -103,15 +103,16 @@ fork(void)
pthread->nxt = NULL;
} else {
if (pthread->attr.stackaddr_attr ==
- NULL && pthread->stack != NULL) {
+ NULL && pthread->stack != NULL)
/*
* Free the stack of the
* dead thread:
*/
free(pthread->stack);
- }
+
if (pthread->specific_data != NULL)
free(pthread->specific_data);
+
free(pthread);
}
diff --git a/lib/libpthread/thread/thr_fork.c b/lib/libpthread/thread/thr_fork.c
index d56f98d..960c1de 100644
--- a/lib/libpthread/thread/thr_fork.c
+++ b/lib/libpthread/thread/thr_fork.c
@@ -103,15 +103,16 @@ fork(void)
pthread->nxt = NULL;
} else {
if (pthread->attr.stackaddr_attr ==
- NULL && pthread->stack != NULL) {
+ NULL && pthread->stack != NULL)
/*
* Free the stack of the
* dead thread:
*/
free(pthread->stack);
- }
+
if (pthread->specific_data != NULL)
free(pthread->specific_data);
+
free(pthread);
}
OpenPOWER on IntegriCloud