From 260f390267f67cf03d5f49af93231e6c3b34809b Mon Sep 17 00:00:00 2001 From: ftillier Date: Mon, 12 Sep 2005 18:08:39 +0000 Subject: [PATCH] [IBAL] Fixed bug with reference counting when listen fails due to duplicate settings. git-svn-id: svn://openib.tc.cornell.edu/gen1@63 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/core/al/al_cm_qp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trunk/core/al/al_cm_qp.c b/trunk/core/al/al_cm_qp.c index 976e36e4..bc2c95c6 100644 --- a/trunk/core/al/al_cm_qp.c +++ b/trunk/core/al/al_cm_qp.c @@ -1953,6 +1953,9 @@ __cep_listen( return status; } + /* Take a reference on behalf of the CEP. */ + ref_al_obj( &p_listen->obj ); + cep_listen.cmp_len = p_cm_listen->compare_length; cep_listen.cmp_offset = p_cm_listen->compare_offset; cep_listen.p_cmp_buf = p_cm_listen->p_compare_buffer; @@ -1970,7 +1973,8 @@ __cep_listen( *ph_cm_listen = p_listen; - /* Note that we keep the reference held on behalf of the CEP. */ + /* Release the reference taken in init_al_obj. */ + deref_al_obj( &p_listen->obj ); AL_EXIT( AL_DBG_CM ); return IB_SUCCESS; -- 2.41.0