diff --git a/src/components/tl/mlx5/mcast/tl_mlx5_mcast_allgather.c b/src/components/tl/mlx5/mcast/tl_mlx5_mcast_allgather.c index edc0522402..92f75a9bcd 100644 --- a/src/components/tl/mlx5/mcast/tl_mlx5_mcast_allgather.c +++ b/src/components/tl/mlx5/mcast/tl_mlx5_mcast_allgather.c @@ -339,7 +339,6 @@ ucc_status_t ucc_tl_mlx5_mcast_allgather_start(ucc_coll_task_t *coll_task) /* register the send buffer */ status = ucc_tl_mlx5_mcast_mem_register(comm->ctx, req->ptr, req->length, ®); if (UCC_OK != status) { - ucc_free(req); goto failed; } req->rreg = reg; @@ -366,6 +365,9 @@ ucc_status_t ucc_tl_mlx5_mcast_allgather_start(ucc_coll_task_t *coll_task) failed: tl_warn(UCC_TASK_LIB(task), "mcast start allgather failed:%d", status); + if (req) { + ucc_free(req); + } coll_task->status = status; return ucc_task_complete(coll_task); } @@ -410,8 +412,6 @@ void ucc_tl_mlx5_mcast_allgather_progress(ucc_coll_task_t *coll_task) coll_task->status = UCC_ERR_NO_RESOURCE; ucc_task_complete(coll_task); } - - return; } ucc_status_t ucc_tl_mlx5_mcast_allgather_init(ucc_tl_mlx5_task_t *task) diff --git a/src/components/tl/mlx5/tl_mlx5_coll.c b/src/components/tl/mlx5/tl_mlx5_coll.c index d0dcc59433..0762d29419 100644 --- a/src/components/tl/mlx5/tl_mlx5_coll.c +++ b/src/components/tl/mlx5/tl_mlx5_coll.c @@ -44,6 +44,8 @@ ucc_status_t ucc_tl_mlx5_coll_mcast_init(ucc_base_coll_args_t *coll_args, break; default: status = UCC_ERR_NOT_SUPPORTED; + tl_trace(team->context->lib, "mcast not supported for this collective type"); + goto free_task; } *task_h = &(task->super);