summaryrefslogtreecommitdiff
path: root/libgomp/team.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/team.c')
-rw-r--r--libgomp/team.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgomp/team.c b/libgomp/team.c
index 18b02e72f90..224236c6604 100644
--- a/libgomp/team.c
+++ b/libgomp/team.c
@@ -498,7 +498,8 @@ gomp_team_end (void)
gomp_mutex_destroy (&team->work_share_list_free_lock);
#endif
- if (__builtin_expect (thr->ts.team != NULL, 0))
+ if (__builtin_expect (thr->ts.team != NULL, 0)
+ || __builtin_expect (team->nthreads == 1, 0))
free_team (team);
else
{