Skip to content

Commit d310a20

Browse files
committed
Add missing free calls to mca_topo_treematch_dist_graph_create
Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
1 parent e23dcca commit d310a20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
204204
* and create a duplicate of the original communicator */
205205
free(vpids);
206206
free(colors);
207+
free(lindex_to_grank);
207208
goto fallback; /* return with success */
208209
}
209210
/* compute local roots ranks in comm_old */
@@ -250,6 +251,7 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
250251
}
251252
if( (0 == num_objs_in_node) || (0 == num_pus_in_node) ) { /* deal with bozo cases: COVERITY 1418505 */
252253
free(colors);
254+
free(lindex_to_grank);
253255
goto fallback; /* return with success */
254256
}
255257
/* Check for oversubscribing */
@@ -288,6 +290,7 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
288290
object = hwloc_get_obj_by_depth(opal_hwloc_topology, effective_depth, obj_rank);
289291
if( NULL == object) {
290292
free(colors);
293+
free(lindex_to_grank);
291294
hwloc_bitmap_free(set);
292295
goto fallback; /* return with success */
293296
}
@@ -315,6 +318,7 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
315318
OPAL_OUTPUT_VERBOSE((10, ompi_topo_base_framework.framework_output,
316319
"Oversubscribing PUs resources => Rank Reordering Impossible \n"));
317320
free(colors);
321+
free(lindex_to_grank);
318322
hwloc_bitmap_free(set);
319323
goto fallback; /* return with success */
320324
}

0 commit comments

Comments
 (0)