Skip to content

Commit bd47062

Browse files
committed
mtl/ofi: Fix error handling.
1 parent 404987e commit bd47062

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
@@ -262,6 +262,7 @@ ompi_mtl_ofi_send_start(struct mca_mtl_base_module_t *mtl,
262262
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
263263
"%s:%d: fi_trecv failed: %s(%zd)",
264264
__FILE__, __LINE__, fi_strerror(-ret), ret);
265+
free(ack_req);
265266
return ompi_mtl_ofi_get_error(ret);
266267
}
267268
} else {
@@ -280,6 +281,10 @@ ompi_mtl_ofi_send_start(struct mca_mtl_base_module_t *mtl,
280281
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
281282
"%s:%d: fi_tinject failed: %s(%zd)",
282283
__FILE__, __LINE__, fi_strerror(-ret), ret);
284+
if (ack_req) {
285+
fi_cancel((fid_t)ompi_mtl_ofi.ep, &ack_req->ctx);
286+
free(ack_req);
287+
}
283288
return ompi_mtl_ofi_get_error(ret);
284289
}
285290

0 commit comments

Comments
 (0)