From 70c509bca8409d55ad7c4a248f453956d163778b Mon Sep 17 00:00:00 2001 From: Arlin Davis Date: Mon, 2 Aug 2010 09:51:30 -0700 Subject: [PATCH] common: cleanup CR linkings after DTO error on EP 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 --- dapl/common/dapl_evd_util.c | 1 + dapl/common/dapl_sp_util.c | 2 ++ 2 files changed, 3 insertions(+) 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); -- 2.41.0