[ofa-general] [PATCH] [master] dapl cma: add check before destroying cm event channel in release

Arlin Davis arlin.r.davis at intel.com
Mon Apr 28 10:13:42 PDT 2008


library may be loaded and unloaded without calling open
in which case the cm event channel is not created.

Signed-off by: Arlin Davis ardavis at ichips.intel.com
---
 dapl/openib_cma/dapl_ib_util.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dapl/openib_cma/dapl_ib_util.c b/dapl/openib_cma/dapl_ib_util.c
index a7ba3d6..1f41186 100755
--- a/dapl/openib_cma/dapl_ib_util.c
+++ b/dapl/openib_cma/dapl_ib_util.c
@@ -178,7 +178,8 @@ int32_t dapls_ib_release(void)
 {
 	dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " dapl_ib_release: \n");
 	dapli_ib_thread_destroy();
-	rdma_destroy_event_channel(g_cm_events);
+	if (g_cm_events != NULL)
+		rdma_destroy_event_channel(g_cm_events);
 	return 0;
 }
 
-- 
1.5.2.5


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20080428/43fa40a8/attachment.html>


More information about the general mailing list