diff --git a/src/components/tl/mlx5/mcast/tl_mlx5_mcast_context.c b/src/components/tl/mlx5/mcast/tl_mlx5_mcast_context.c index c5cf29bc10..5361f1deb5 100644 --- a/src/components/tl/mlx5/mcast/tl_mlx5_mcast_context.c +++ b/src/components/tl/mlx5/mcast/tl_mlx5_mcast_context.c @@ -292,12 +292,10 @@ ucc_status_t ucc_tl_mlx5_mcast_clean_ctx(ucc_tl_mlx5_mcast_coll_context_t *ctx) ctx->channel = NULL; } - // if (ctx->devname && !strcmp(ctx->params.ib_dev_name, "")) { - // // ucc_free(ctx->devname); - // ctx->devname = NULL; - //} - - ucc_free(ctx); + if (ctx->devname && !strcmp(ctx->params.ib_dev_name, "")) { + ucc_free(ctx->devname); + ctx->devname = NULL; + } return UCC_OK; }