Skip to content

Commit 8d0c50a

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]>
1 parent 8f84e8d commit 8d0c50a

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
@@ -509,6 +509,8 @@ hwloc_look_freebsd_domains(struct hwloc_topology *topology){
509509
}
510510
if(nodes != NULL && !(topology->flags & HWLOC_TOPOLOGY_FLAG_NO_DISTANCES))
511511
set_locality_info(topology, ndomains, nodes);
512+
else
513+
free(nodes);
512514

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

0 commit comments

Comments
 (0)