Skip to content

Commit c3a57a2

Browse files
committed
freebsd: fix a node array leak when distances are available but ignored
Forgotten when adding NO_DISTANCES flag in commit c90ad95 Signed-off-by: Brice Goglin <[email protected]> (cherry picked from commit 8d0c50a)
1 parent c1f0e34 commit c3a57a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hwloc/topology-freebsd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ hwloc_look_freebsd_domains(struct hwloc_topology *topology){
505505
}
506506
if(nodes != NULL && !(topology->flags & HWLOC_TOPOLOGY_FLAG_NO_DISTANCES))
507507
set_locality_info(topology, ndomains, nodes);
508+
else
509+
free(nodes);
508510

509511
/* nodes is either freed or given to the core in set_locality_info() */
510512
free(domains_memory);

0 commit comments

Comments
 (0)