summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2017-01-18 06:40:19 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2017-01-18 06:40:19 +0000
commitd0365a228c0714d139bfa7c1569f038b94ee0a15 (patch)
tree33d2cb0c2116a8f8052cf33950985b2cd87e2d31 /openmp/runtime/src
parent3dd2abb0b8b5b145fc163ddb76a9867fa4900032 (diff)
downloadbcm5719-llvm-d0365a228c0714d139bfa7c1569f038b94ee0a15.tar.gz
bcm5719-llvm-d0365a228c0714d139bfa7c1569f038b94ee0a15.zip
Fix small memory leak regarding __kmp_nested_proc_bind
There is no corresponding free() for this expandable array. The logic is added in __kmp_cleanup() next to the freeing of __kmp_nested_nth. llvm-svn: 292348
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/kmp_runtime.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp
index e8626d16615..567888156fb 100644
--- a/openmp/runtime/src/kmp_runtime.cpp
+++ b/openmp/runtime/src/kmp_runtime.cpp
@@ -7293,6 +7293,10 @@ __kmp_cleanup( void )
__kmp_nested_nth.nth = NULL;
__kmp_nested_nth.size = 0;
__kmp_nested_nth.used = 0;
+ KMP_INTERNAL_FREE( __kmp_nested_proc_bind.bind_types );
+ __kmp_nested_proc_bind.bind_types = NULL;
+ __kmp_nested_proc_bind.size = 0;
+ __kmp_nested_proc_bind.used = 0;
__kmp_i18n_catclose();
OpenPOWER on IntegriCloud