[WSD] fix a nested loop in the function ibsp_dereg_hca()
[mirror/winof/.git] / ulp / wsd / user / ibsp_mem.c
index 0361e2c..a1f431c 100644 (file)
@@ -246,6 +246,7 @@ ibsp_dereg_hca(
        IN                              struct mr_list                          *mem_list )\r
 {\r
        cl_list_item_t *item;\r
+       cl_list_item_t *item1;\r
 \r
        IBSP_ENTER( IBSP_DBG_MEM );\r
 \r
@@ -264,13 +265,12 @@ ibsp_dereg_hca(
                 * Clear the pointer from the node to this registration.  No need\r
                 * to remove from the list as we're about to free the registration.\r
                 */\r
-               for( item = cl_qlist_head( &p_reg->node_list );\r
-                       item != cl_qlist_end( &p_reg->node_list );\r
-                       item = cl_qlist_next( item ) )\r
+               for( item1 = cl_qlist_head( &p_reg->node_list );\r
+                       item1 != cl_qlist_end( &p_reg->node_list );\r
+                       item1 = cl_qlist_next( item1 ) )\r
                {\r
                        struct memory_node *p_node =\r
-                               PARENT_STRUCT( item, struct memory_node, mr_item );\r
-\r
+                               PARENT_STRUCT( item1, struct memory_node, mr_item );\r
                        p_node->p_reg = NULL;\r
                }\r
 \r