summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorAndrey Churbanov <Andrey.Churbanov@intel.com>2016-10-20 17:14:17 +0000
committerAndrey Churbanov <Andrey.Churbanov@intel.com>2016-10-20 17:14:17 +0000
commit2e68768d1e66b087c0f73a23a29ad6e903681897 (patch)
treecc236ed8ef1c51347a02ae0f62208eb9050bba47 /openmp/runtime/src
parent0051efcf977134026a8e2a2239e2c28815d07e40 (diff)
downloadbcm5719-llvm-2e68768d1e66b087c0f73a23a29ad6e903681897.tar.gz
bcm5719-llvm-2e68768d1e66b087c0f73a23a29ad6e903681897.zip
Fixed memory leak mistakenly introduced by https://reviews.llvm.org/D23115
Differential Revision: http://reviews.llvm.org/D25510 llvm-svn: 284747
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/kmp_tasking.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/openmp/runtime/src/kmp_tasking.c b/openmp/runtime/src/kmp_tasking.c
index 7a74267f7f0..60efc1d83e3 100644
--- a/openmp/runtime/src/kmp_tasking.c
+++ b/openmp/runtime/src/kmp_tasking.c
@@ -579,9 +579,11 @@ __kmp_free_task_and_ancestors( kmp_int32 gtid, kmp_taskdata_t * taskdata, kmp_in
#if OMP_45_ENABLED
// Proxy tasks must always be allowed to free their parents
// because they can be run in background even in serial mode.
- kmp_int32 task_serial = taskdata->td_flags.task_serial && !taskdata->td_flags.proxy;
+ kmp_int32 team_serial = ( taskdata->td_flags.team_serial ||
+ taskdata->td_flags.tasking_ser ) && !taskdata->td_flags.proxy;
#else
- kmp_int32 task_serial = taskdata->td_flags.task_serial;
+ kmp_int32 team_serial = taskdata->td_flags.team_serial ||
+ taskdata->td_flags.tasking_ser;
#endif
KMP_DEBUG_ASSERT( taskdata -> td_flags.tasktype == TASK_EXPLICIT );
@@ -603,7 +605,7 @@ __kmp_free_task_and_ancestors( kmp_int32 gtid, kmp_taskdata_t * taskdata, kmp_in
// Stop checking ancestors at implicit task
// instead of walking up ancestor tree to avoid premature deallocation of ancestors.
- if ( task_serial || taskdata -> td_flags.tasktype == TASK_IMPLICIT )
+ if ( team_serial || taskdata -> td_flags.tasktype == TASK_IMPLICIT )
return;
// Predecrement simulated by "- 1" calculation
OpenPOWER on IntegriCloud