]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[IBAL] Fixed bug with reference counting when listen fails due
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 12 Sep 2005 18:08:39 +0000 (18:08 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 12 Sep 2005 18:08:39 +0000 (18:08 +0000)
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

index 976e36e477307c054cbcd48ca2171c02c52bfeb7..bc2c95c6157deb6a8960bdf79f46cf8d230122e9 100644 (file)
@@ -1953,6 +1953,9 @@ __cep_listen(
                return status;\r
        }\r
 \r
+       /* Take a reference on behalf of the CEP. */\r
+       ref_al_obj( &p_listen->obj );\r
+\r
        cep_listen.cmp_len = p_cm_listen->compare_length;\r
        cep_listen.cmp_offset = p_cm_listen->compare_offset;\r
        cep_listen.p_cmp_buf = p_cm_listen->p_compare_buffer;\r
@@ -1970,7 +1973,8 @@ __cep_listen(
 \r
        *ph_cm_listen = p_listen;\r
 \r
-       /* Note that we keep the reference held on behalf of the CEP. */\r
+       /* Release the reference taken in init_al_obj. */\r
+       deref_al_obj( &p_listen->obj );\r
 \r
        AL_EXIT( AL_DBG_CM );\r
        return IB_SUCCESS;\r