<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>[PATCH] [master] dapl cma: add check before destroying cm event channel in release</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>
<P><FONT SIZE=2 FACE="Arial">library may be loaded and unloaded without calling open</FONT>
<BR><FONT SIZE=2 FACE="Arial">in which case the cm event channel is not created.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Signed-off by: Arlin Davis ardavis@ichips.intel.com</FONT>
<BR><FONT SIZE=2 FACE="Arial">---</FONT>
<BR><FONT SIZE=2 FACE="Arial"> dapl/openib_cma/dapl_ib_util.c | 3 ++-</FONT>
<BR><FONT SIZE=2 FACE="Arial"> 1 files changed, 2 insertions(+), 1 deletions(-)</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">diff --git a/dapl/openib_cma/dapl_ib_util.c b/dapl/openib_cma/dapl_ib_util.c</FONT>
<BR><FONT SIZE=2 FACE="Arial">index a7ba3d6..1f41186 100755</FONT>
<BR><FONT SIZE=2 FACE="Arial">--- a/dapl/openib_cma/dapl_ib_util.c</FONT>
<BR><FONT SIZE=2 FACE="Arial">+++ b/dapl/openib_cma/dapl_ib_util.c</FONT>
<BR><FONT SIZE=2 FACE="Arial">@@ -178,7 +178,8 @@ int32_t dapls_ib_release(void)</FONT>
<BR><FONT SIZE=2 FACE="Arial"> {</FONT>
<BR><FONT SIZE=2 FACE="Arial"> dapl_dbg_log(DAPL_DBG_TYPE_UTIL, " dapl_ib_release: \n");</FONT>
<BR><FONT SIZE=2 FACE="Arial"> dapli_ib_thread_destroy();</FONT>
<BR><FONT SIZE=2 FACE="Arial">- rdma_destroy_event_channel(g_cm_events);</FONT>
<BR><FONT SIZE=2 FACE="Arial">+ if (g_cm_events != NULL)</FONT>
<BR><FONT SIZE=2 FACE="Arial">+ rdma_destroy_event_channel(g_cm_events);</FONT>
<BR><FONT SIZE=2 FACE="Arial"> return 0;</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
<BR><FONT SIZE=2 FACE="Arial"> </FONT>
<BR><FONT SIZE=2 FACE="Arial">-- </FONT>
<BR><FONT SIZE=2 FACE="Arial">1.5.2.5</FONT>
</P>
<BR>
</BODY>
</HTML>