Skip to content

Commit 36e68d5

Browse files
author
David Wootton
committed
Fix memory leak in mca_coll_han_init_dynamic_rules
Coverity CID 1516452 Signed-off-by: David Wootton <[email protected]>
1 parent 658f721 commit 36e68d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ompi/mca/coll/han/coll_han_dynamic_file.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ mca_coll_han_init_dynamic_rules(void)
455455
fclose(fptr);
456456

457457
check_dynamic_rules();
458+
free(algorithm_name);
458459
return OMPI_SUCCESS;
459460

460461
cannot_allocate:
@@ -467,6 +468,7 @@ mca_coll_han_init_dynamic_rules(void)
467468
if( NULL != coll_name ) {
468469
free(coll_name);
469470
}
471+
free(algorithm_name);
470472
fclose (fptr);
471473
/* We disable the module, we don't need to keep the rules */
472474
mca_coll_han_free_dynamic_rules();
@@ -482,6 +484,7 @@ mca_coll_han_init_dynamic_rules(void)
482484
if( NULL != coll_name ) {
483485
free(coll_name);
484486
}
487+
free(algorithm_name);
485488
fclose (fptr);
486489
/* We disable the module, we don't need to keep the rules */
487490
mca_coll_han_free_dynamic_rules();

0 commit comments

Comments
 (0)