]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix memory leak in libgomp when using OpenMP
authorKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 30 Jul 2019 14:10:53 +0000 (07:10 -0700)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:51:25 +0000 (12:51 +0100)
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)

libgomp/ChangeLog.omp
libgomp/config/gcn/team.c

index 980185751f6a59b86a6470e73c12d9f843e27483..59605cd85bf598a86be4306cd874e56c782dfa99 100644 (file)
@@ -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.
index 79aec65a24e999fe286d5ad865b13993309790fe..534cf595c9859cca6961c2c05d93eea2e5f80c0f 100644 (file)
@@ -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