Skip to content

Commit c87d667

Browse files
authored
Merge pull request #13172 from hppritcha/fix_han_mem_leaks
HAN: plug some memory leaks found by valgrind
2 parents 96864aa + 0e75d9d commit c87d667

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ompi/mca/coll/han/coll_han_component.c

+1
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ static int han_open(void)
147147
static int han_close(void)
148148
{
149149
mca_coll_han_free_dynamic_rules();
150+
mca_coll_han_free_algorithms();
150151

151152
free(mca_coll_han_component.han_op_module_name.bcast.han_op_up_module_name);
152153
mca_coll_han_component.han_op_module_name.bcast.han_op_up_module_name = NULL;

ompi/mca/coll/han/coll_han_subcomms.c

+3
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ int mca_coll_han_comm_create_new(struct ompi_communicator_t *comm,
187187
/*
188188
* Set the cached info
189189
*/
190+
if (NULL != han_module->cached_vranks) {
191+
free(han_module->cached_vranks);
192+
}
190193
han_module->cached_vranks = vranks;
191194

192195
/* Restore the saved collectives */

0 commit comments

Comments
 (0)