Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit dd6f479

Browse files
committed
mtl/ofi: Fix error handling.
(cherry-picked from open-mpi/ompi@bd47062)
1 parent 4292cac commit dd6f479

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ompi/mca/mtl/ofi/mtl_ofi.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ ompi_mtl_ofi_send_start(struct mca_mtl_base_module_t *mtl,
263263
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
264264
"%s:%d: fi_trecv failed: %s(%zd)",
265265
__FILE__, __LINE__, fi_strerror(-ret), ret);
266+
free(ack_req);
266267
return ompi_mtl_ofi_get_error(ret);
267268
}
268269
} else {
@@ -281,6 +282,10 @@ ompi_mtl_ofi_send_start(struct mca_mtl_base_module_t *mtl,
281282
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
282283
"%s:%d: fi_tinject failed: %s(%zd)",
283284
__FILE__, __LINE__, fi_strerror(-ret), ret);
285+
if (ack_req) {
286+
fi_cancel((fid_t)ompi_mtl_ofi.ep, &ack_req->ctx);
287+
free(ack_req);
288+
}
284289
return ompi_mtl_ofi_get_error(ret);
285290
}
286291

0 commit comments

Comments
 (0)