Add cleanup to remove CR from SP and EP during DTO errors in dapli_evd_cqe_to_event.
dapl_sp_remove_ep needs to remove cr_ptr reference from EP before freeing cr object. Signed-off-by: Arlin Davis <[email protected]> --- dapl/common/dapl_evd_util.c | 1 + dapl/common/dapl_sp_util.c | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dapl/common/dapl_evd_util.c b/dapl/common/dapl_evd_util.c index cb3eb1b..12d38ff 100644 --- a/dapl/common/dapl_evd_util.c +++ b/dapl/common/dapl_evd_util.c @@ -1316,6 +1316,7 @@ dapli_evd_cqe_to_event(IN DAPL_EVD * evd_ptr, /* ... and clean up the local side */ evd_ptr = (DAPL_EVD *) ep_ptr->param.connect_evd_handle; + dapl_sp_remove_ep (ep_ptr); if (evd_ptr != NULL) { dapls_evd_post_connection_event(evd_ptr, DAT_CONNECTION_EVENT_BROKEN, diff --git a/dapl/common/dapl_sp_util.c b/dapl/common/dapl_sp_util.c index c1a3fdb..fba3711 100644 --- a/dapl/common/dapl_sp_util.c +++ b/dapl/common/dapl_sp_util.c @@ -264,6 +264,8 @@ void dapl_sp_remove_ep(IN DAPL_EP * ep_ptr) dapl_os_unlock(&sp_ptr->header.lock); + ep_ptr->cr_ptr = NULL; + /* free memory outside of the lock */ dapls_cr_free(cr_ptr); -- 1.5.2.5 _______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
