From: sleybo Date: Thu, 21 Dec 2006 07:04:22 +0000 (+0000) Subject: [WSD] fix a nested loop in the function ibsp_dereg_hca() X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=c6635e5e8d272fc043b340241c7f5af0ed91b3c5;p=~shefty%2Frdma-win.git [WSD] fix a nested loop in the function ibsp_dereg_hca() git-svn-id: svn://openib.tc.cornell.edu/gen1@565 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/ulp/wsd/user/ibsp_mem.c b/trunk/ulp/wsd/user/ibsp_mem.c index 0361e2ce..a1f431c5 100644 --- a/trunk/ulp/wsd/user/ibsp_mem.c +++ b/trunk/ulp/wsd/user/ibsp_mem.c @@ -246,6 +246,7 @@ ibsp_dereg_hca( IN struct mr_list *mem_list ) { cl_list_item_t *item; + cl_list_item_t *item1; IBSP_ENTER( IBSP_DBG_MEM ); @@ -264,13 +265,12 @@ ibsp_dereg_hca( * Clear the pointer from the node to this registration. No need * to remove from the list as we're about to free the registration. */ - for( item = cl_qlist_head( &p_reg->node_list ); - item != cl_qlist_end( &p_reg->node_list ); - item = cl_qlist_next( item ) ) + for( item1 = cl_qlist_head( &p_reg->node_list ); + item1 != cl_qlist_end( &p_reg->node_list ); + item1 = cl_qlist_next( item1 ) ) { struct memory_node *p_node = - PARENT_STRUCT( item, struct memory_node, mr_item ); - + PARENT_STRUCT( item1, struct memory_node, mr_item ); p_node->p_reg = NULL; }