[DAPL2] fix cookie leak.
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sat, 9 Feb 2008 01:35:24 +0000 (01:35 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sat, 9 Feb 2008 01:35:24 +0000 (01:35 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@935 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/dapl2/dapl/common/dapl_evd_util.c

index ee5f943..94504b4 100644 (file)
@@ -1083,7 +1083,10 @@ dapli_evd_cqe_to_event (
                DAPL_GET_CQE_OPTYPE(cqe_ptr) !=  OP_RECEIVE))\r
            {\r
                dapls_cqe_to_event_extension (ep_ptr, cookie, cqe_ptr, event_ptr);\r
-               dapls_cookie_dealloc (&ep_ptr->req_buffer, cookie);\r
+               if (cookie->val.dto.type == DAPL_DTO_TYPE_RECV)\r
+                       dapls_cookie_dealloc (&ep_ptr->recv_buffer, cookie);\r
+               else\r
+                       dapls_cookie_dealloc (&ep_ptr->req_buffer, cookie);\r
                break;\r
            }\r
 #endif\r