Skip to content

Commit 44ea9ef

Browse files
committed
ompi_proc_complete_init: always reset u16ptr
if a key is not found, u16ptr is set to NULL and following opal_value_unload calls might fail (back ported from commit open-mpi/ompi@57ecce4)
1 parent c1825b3 commit 44ea9ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/proc/proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ int ompi_proc_complete_init(void)
142142
uint16_t u16, *u16ptr;
143143

144144
OPAL_THREAD_LOCK(&ompi_proc_lock);
145-
u16ptr = &u16;
146145

147146
OPAL_LIST_FOREACH(proc, &ompi_proc_list, ompi_proc_t) {
148147
if (OMPI_CAST_RTE_NAME(&proc->super.proc_name)->vpid != OMPI_PROC_MY_NAME->vpid) {
149148
/* get the locality information - all RTEs are required
150149
* to provide this information at startup */
150+
u16ptr = &u16;
151151
OPAL_MODEX_RECV_VALUE_OPTIONAL(ret, OPAL_PMIX_LOCALITY, &proc->super.proc_name, &u16ptr, OPAL_UINT16);
152152
if (OPAL_SUCCESS != ret) {
153153
proc->super.proc_flags = OPAL_PROC_NON_LOCAL;

0 commit comments

Comments
 (0)