Skip to content

Commit b851d2f

Browse files
authored
Merge pull request #10935 from drwootton/coverity_bug_1515837
Fix memory leak in ompi_report_comm_methods by removing redundant malloc, Coverity CID 1515837
2 parents 3221782 + 5c28139 commit b851d2f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

ompi/mca/hook/comm_method/hook_comm_method_fns.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,6 @@ ompi_report_comm_methods(int called_from_location)
525525

526526
// Each host leader fills in a "numhosts" sized array method[] of
527527
// how it communicates with each peer.
528-
// Use a bitmap to keep track of which communication methods are used
529-
n = ((comm_method_string_conversion.n + 7) / 8) * sizeof(unsigned char);
530-
methods_used = malloc(n);
531-
memset(methods_used, 0, n);
532-
533528
for (i=0; i<nleaderranks; ++i) {
534529
method[i] = comm_method(leader_comm, i);
535530

0 commit comments

Comments
 (0)