Add checking for pipe FD's during destroy and clean them up with close. Signed-off-by: Arlin Davis <arlin.r.da...@intel.com> --- dapl/openib_cma/dapl_ib_cq.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dapl/openib_cma/dapl_ib_cq.c b/dapl/openib_cma/dapl_ib_cq.c index cf19f38..c54bbaf 100644 --- a/dapl/openib_cma/dapl_ib_cq.c +++ b/dapl/openib_cma/dapl_ib_cq.c @@ -462,8 +462,11 @@ dapls_ib_wait_object_create(IN DAPL_EVD *evd_ptr, ibv_create_comp_channel( evd_ptr->header.owner_ia->hca_ptr->ib_hca_handle); - if ((*p_cq_wait_obj_handle)->events == NULL) + if ((*p_cq_wait_obj_handle)->events == NULL) { + close((*p_cq_wait_obj_handle)->pipe[0]); + close((*p_cq_wait_obj_handle)->pipe[1]); goto bail; + } return DAT_SUCCESS; bail: @@ -483,6 +486,9 @@ dapls_ib_wait_object_destroy(IN ib_wait_obj_handle_t p_cq_wait_obj_handle) ibv_destroy_comp_channel(p_cq_wait_obj_handle->events); + close(p_cq_wait_obj_handle->pipe[0]); + close(p_cq_wait_obj_handle->pipe[1]); + dapl_os_free(p_cq_wait_obj_handle, sizeof(struct _ib_wait_obj_handle)); -- 1.5.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html