]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
Fix SA request IRP cancellation leaking handles, which could cause
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 29 Jul 2005 05:57:21 +0000 (05:57 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 29 Jul 2005 05:57:21 +0000 (05:57 +0000)
dereferencing freed memory.

git-svn-id: svn://openib.tc.cornell.edu/gen1@51 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/al/kernel/al_proxy_subnet.c

index df7d86d8745057088a00daf5f3b196171f8777a4..89465703d42501dba63089f88eedd295c5203dc4 100644 (file)
@@ -184,8 +184,9 @@ __proxy_cancel_sa_req(
 #pragma warning(pop)\r
                cl_spinlock_acquire( &p_context->h_al->obj.lock );\r
                p_sa_req = al_hdl_chk( p_context->h_al, hdl, AL_OBJ_TYPE_H_SA_REQ );\r
-               if( p_sa_req )\r
-                       al_cancel_sa_req( p_sa_req );\r
+               CL_ASSERT( p_sa_req );\r
+               al_cancel_sa_req( p_sa_req );\r
+               al_hdl_free( p_context->h_al, hdl );\r
                cl_spinlock_release( &p_context->h_al->obj.lock );\r
        }\r
 \r