forked from OSchip/llvm-project
Fixed missing memory cleanup in __kmp_affinity_create_hwloc_map()
Cleanup: fixed missing memory cleanup in couple of corner cases. Fixes possible memory leak in some corner cases Patch by Andrey Churbanov Differential Revision: http://reviews.llvm.org/D21355 llvm-svn: 272946
This commit is contained in:
parent
4ba3b0cda9
commit
72a8498e08
|
@ -414,6 +414,7 @@ __kmp_affinity_create_hwloc_map(AddrUnsPair **address2os,
|
|||
KMP_INFORM(Topology, "KMP_AFFINITY", nPackages, nCoresPerPkg,
|
||||
__kmp_nThreadsPerCore, __kmp_ncores);
|
||||
}
|
||||
KMP_CPU_FREE(oldMask);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -562,6 +563,7 @@ __kmp_affinity_create_hwloc_map(AddrUnsPair **address2os,
|
|||
}
|
||||
|
||||
if (__kmp_affinity_type == affinity_none) {
|
||||
__kmp_free(retval);
|
||||
KMP_CPU_FREE(oldMask);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue