diff --git a/ompi/mca/mtl/mxm/mtl_mxm.c b/ompi/mca/mtl/mxm/mtl_mxm.c index 26a15526e7..0d1b3378c8 100644 --- a/ompi/mca/mtl/mxm/mtl_mxm.c +++ b/ompi/mca/mtl/mxm/mtl_mxm.c @@ -500,12 +500,10 @@ int ompi_mtl_mxm_del_procs(struct mca_mtl_base_module_t *mtl, size_t nprocs, * in the way we handle endpoints as objects */ for (i = 0; i < nprocs; ++i) { - if (((opal_object_t*)procs[i])->obj_reference_count == 1) { - mca_mtl_mxm_endpoint_t *endpoint = (mca_mtl_mxm_endpoint_t*) - procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL]; - mxm_ep_disconnect(endpoint->mxm_conn); - OBJ_RELEASE(endpoint); - } + mca_mtl_mxm_endpoint_t *endpoint = (mca_mtl_mxm_endpoint_t*) + procs[i]->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_MTL]; + mxm_ep_disconnect(endpoint->mxm_conn); + OBJ_RELEASE(endpoint); } return OMPI_SUCCESS; }