aboutsummaryrefslogtreecommitdiff
path: root/libgomp/team.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-05-20 22:54:45 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2009-05-20 22:54:45 +0200
commit6dea8e99a9430efa08176dfa5beb94fa9996480b (patch)
treeac1520d8302b1b216a402af4fbd1d4c07a0c1b99 /libgomp/team.c
parent00c5fa1bcabdd988e036491774540ee2dceb5530 (diff)
downloadgcc-6dea8e99a9430efa08176dfa5beb94fa9996480b.zip
gcc-6dea8e99a9430efa08176dfa5beb94fa9996480b.tar.gz
gcc-6dea8e99a9430efa08176dfa5beb94fa9996480b.tar.bz2
re PR libgomp/40174 (Memory leak when using '#pragma omp parallel')
PR libgomp/40174 * team.c (gomp_thread_start): Destroy thr->release semaphore. (gomp_free_pool_helper): Likewise. From-SVN: r147747
Diffstat (limited to 'libgomp/team.c')
-rw-r--r--libgomp/team.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgomp/team.c b/libgomp/team.c
index 4110e3f..44ffd56 100644
--- a/libgomp/team.c
+++ b/libgomp/team.c
@@ -125,6 +125,7 @@ gomp_thread_start (void *xdata)
while (local_fn);
}
+ gomp_sem_destroy (&thr->release);
return NULL;
}
@@ -201,6 +202,7 @@ gomp_free_pool_helper (void *thread_pool)
struct gomp_thread_pool *pool
= (struct gomp_thread_pool *) thread_pool;
gomp_barrier_wait_last (&pool->threads_dock);
+ gomp_sem_destroy (&gomp_thread ()->release);
pthread_exit (NULL);
}