diff options
author | Kwok Cheung Yeung <kcy@codesourcery.com> | 2019-07-30 07:10:53 -0700 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2020-03-03 12:51:25 +0100 |
commit | b03f950bf377508c588e488b4e5625ae142c80ac (patch) | |
tree | 9082bcf179e9749319e1e775266b82c4b427fe1d | |
parent | 7f925450379fe7fcaecafd38d6fa67aaa499cd6d (diff) | |
download | gcc-b03f950bf377508c588e488b4e5625ae142c80ac.zip gcc-b03f950bf377508c588e488b4e5625ae142c80ac.tar.gz gcc-b03f950bf377508c588e488b4e5625ae142c80ac.tar.bz2 |
Fix memory leak in libgomp when using OpenMP
2019-09-10 Kwok Cheung Yeung <kcy@codesourcery.com>
libgomp/
* config/gcn/team.c (gomp_gcn_exit_kernel): Free GCN thread list.
(cherry picked from openacc-gcc-9-branch commit
6cee7b36a0fa68d0ca1ad4cc7fb860c54eaf4c6b)
-rw-r--r-- | libgomp/ChangeLog.omp | 4 | ||||
-rw-r--r-- | libgomp/config/gcn/team.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 9801857..59605cd 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,7 @@ +2019-09-10 Kwok Cheung Yeung <kcy@codesourcery.com> + + * config/gcn/team.c (gomp_gcn_exit_kernel): Free GCN thread list. + 2019-09-10 Andrew Stubbs <ams@codesourcery.com> * plugin/plugin-gcn.c (HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUNT): Define. diff --git a/libgomp/config/gcn/team.c b/libgomp/config/gcn/team.c index 79aec65..534cf59 100644 --- a/libgomp/config/gcn/team.c +++ b/libgomp/config/gcn/team.c @@ -93,6 +93,7 @@ void gomp_gcn_exit_kernel (void) { gomp_free_thread (gcn_thrs ()); + free (gcn_thrs ()); } /* This function contains the idle loop in which a thread waits |