diff --git a/ompi/communicator/comm_cid.c b/ompi/communicator/comm_cid.c index 9b71f7d629..bd3ce84b7b 100644 --- a/ompi/communicator/comm_cid.c +++ b/ompi/communicator/comm_cid.c @@ -909,9 +909,8 @@ static int ompi_comm_allreduce_pmix_reduce_complete (ompi_comm_request_t *reques } PMIX_PDATA_CONSTRUCT(&pdat); - - info.value.type = OPAL_BYTE_OBJECT; - pdat.value.type = OPAL_BYTE_OBJECT; + PMIX_INFO_CONSTRUCT(&info); + info.value.type = PMIX_BYTE_OBJECT; opal_dss.unload(&sbuf, (void**)&info.value.data.bo.bytes, &rc); info.value.data.bo.size = rc; @@ -959,6 +958,10 @@ static int ompi_comm_allreduce_pmix_reduce_complete (ompi_comm_request_t *reques OBJ_DESTRUCT(&pdat); return rc; } + if (PMIX_BYTE_OBJECT != pdat.value.type) { + OBJ_DESTRUCT(&pdat); + return OPAL_ERR_TYPE_MISMATCH; + } OBJ_CONSTRUCT(&sbuf, opal_buffer_t); opal_dss.load(&sbuf, pdat.value.data.bo.bytes, pdat.value.data.bo.size);