Skip to content

Commit c864ca5

Browse files
committed
PML/UCX: Don't destroy UCP worker if it wasn't created
Signed-off-by: Dmitry Gladkov <dmitrygla@mellanox.com>
1 parent 9920da4 commit c864ca5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/mca/pml/ucx/pml_ucx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ int mca_pml_ucx_init(void)
257257

258258
err_destroy_worker:
259259
ucp_worker_destroy(ompi_pml_ucx.ucp_worker);
260-
ompi_pml_ucx.ucp_worker = NULL;
261260
err:
261+
ompi_pml_ucx.ucp_worker = NULL;
262262
return rc;
263263
}
264264

@@ -288,7 +288,7 @@ int mca_pml_ucx_cleanup(void)
288288
OBJ_DESTRUCT(&ompi_pml_ucx.convs);
289289
OBJ_DESTRUCT(&ompi_pml_ucx.persistent_reqs);
290290

291-
if (ompi_pml_ucx.ucp_worker) {
291+
if (ompi_pml_ucx.ucp_worker != NULL) {
292292
ucp_worker_destroy(ompi_pml_ucx.ucp_worker);
293293
ompi_pml_ucx.ucp_worker = NULL;
294294
}

0 commit comments

Comments
 (0)