Skip to content

Commit 0e19149

Browse files
authored
Merge pull request #13362 from hppritcha/cid_1660795
CID 1660795 - fix potential memory leak
2 parents ad8c41b + 3d3bfb6 commit 0e19149

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* reserved.
1313
* Copyright (c) 2017 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
15+
* Copyright (c) 2025 Triad National Security, LLC. All rights
16+
* reserved.
1517
* $COPYRIGHT$
1618
*
1719
* Additional copyrights may follow
@@ -446,6 +448,7 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
446448

447449
if (OMPI_SUCCESS != ( err = ompi_request_wait_all(num_nodes - 1,
448450
reqs, MPI_STATUSES_IGNORE))) {
451+
free(obj_to_rank_in_comm);
449452
free(objs_per_node);
450453
goto release_and_return;
451454
}

0 commit comments

Comments
 (0)