Skip to content

Commit 01f7f9e

Browse files
author
David Wootton
committed
Fix SIGSEGV due to null pointer in [200~hook_comm_method_fns.c(comm_method_sring)
if no UCX tnsport info returned Signed-off-by: David Wootton <dwootton@us.ibm.com>
1 parent a1cb128 commit 01f7f9e

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)