Skip to content

Commit 06b8c8b

Browse files
authored
Merge pull request #10440 from drwootton/prot_null_sigsegv
Fix SIGSEGV due to null pointer in prot_hook_comm_method_fns.c(comm_method_string)
2 parents a1cb128 + 01f7f9e commit 06b8c8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/mca/hook/comm_method/hook_comm_method_fns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ comm_method_string(MPI_Comm comm, int rank, int *comm_mode) {
144144
strcat(string, ";");
145145
strcat(string, transports->entries[i].device_name);
146146
}
147+
free(transports->entries);
148+
free(transports);
147149
}
148150
if (comm_mode) {
149151
// UCX is used for PML mode only
150152
*comm_mode = MODE_IS_PML;
151153
}
152-
free(transports->entries);
153-
free(transports);
154154
return string;
155155
}
156156

0 commit comments

Comments
 (0)