Skip to content

Commit c0f4876

Browse files
authored
Merge pull request #13072 from ggouaillardet/topic/acoll_leak
coll/acoll: plug a memory leak
2 parents c5e02ab + ae0db67 commit c0f4876

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ompi/mca/coll/acoll/coll_acoll_module.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ mca_coll_base_module_t *mca_coll_acoll_comm_query(struct ompi_communicator_t *co
6060
{
6161
mca_coll_acoll_module_t *acoll_module;
6262

63-
acoll_module = OBJ_NEW(mca_coll_acoll_module_t);
64-
if (NULL == acoll_module) {
65-
return NULL;
66-
}
67-
6863
if (OMPI_COMM_IS_INTER(comm)) {
6964
*priority = 0;
7065
return NULL;
@@ -74,6 +69,11 @@ mca_coll_base_module_t *mca_coll_acoll_comm_query(struct ompi_communicator_t *co
7469
return NULL;
7570
}
7671

72+
acoll_module = OBJ_NEW(mca_coll_acoll_module_t);
73+
if (NULL == acoll_module) {
74+
return NULL;
75+
}
76+
7777
*priority = mca_coll_acoll_priority;
7878

7979
/* Set topology params */

0 commit comments

Comments
 (0)