From 350ba0919296a8718982437660bd0344e058470e Mon Sep 17 00:00:00 2001 From: Arlin Davis Date: Fri, 25 Apr 2008 15:12:14 -0700 Subject: [PATCH] dapl: add check before destroying cm event channel in release 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@ichips.intel.com --- dapl/openib_cma/dapl_ib_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dapl/openib_cma/dapl_ib_util.c b/dapl/openib_cma/dapl_ib_util.c index 5f4fbd0..56c0a05 100755 --- a/dapl/openib_cma/dapl_ib_util.c +++ b/dapl/openib_cma/dapl_ib_util.c @@ -189,7 +189,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; } -- 2.41.0