From: Arlin Davis Date: Fri, 25 Apr 2008 22:12:14 +0000 (-0700) Subject: dapl: add check before destroying cm event channel in release X-Git-Tag: dapl-1.2.6-1~6 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=350ba0919296a8718982437660bd0344e058470e;p=~ardavis%2Fdapl.git 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 --- 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; }