Skip to content

Commit

Permalink
ompi/oshmem/spml/ucx: Fix cleanup when disconnected: avoid double free
Browse files Browse the repository at this point in the history
  • Loading branch information
iyastreb committed Feb 5, 2024
1 parent 9d69edb commit 0f16fbe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions oshmem/mca/spml/ucx/spml_ucx_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ static void mca_spml_ucx_ctx_fini(mca_spml_ucx_ctx_t *ctx)

static int mca_spml_ucx_component_fini(void)
{
int fenced = 0, i;
volatile int fenced = 0;
int i;
int ret = OSHMEM_SUCCESS;
mca_spml_ucx_ctx_t *ctx;

Expand Down Expand Up @@ -491,7 +492,10 @@ static int mca_spml_ucx_component_fini(void)


ret = opal_common_ucx_mca_pmix_fence_nb(&fenced);
if (OPAL_SUCCESS != ret) {
if (ret == PMIX_ERR_UNREACH) {
/* It's ok if we are disconnected, continue cleanup */
fenced = 1;
} else if (ret != PMIX_SUCCESS) {
return ret;
}

Expand Down

0 comments on commit 0f16fbe

Please sign in to comment.