Vector sort_arr was actually never freed.
This change also removes some nearby code which
happens to be totally useless.
Change-Id: I2f265c1b4770cbcd75a2fb69ea54e46e1b54245a
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
lb_new_flow_entry_t *new_flow_table = 0;
lb_as_t *as;
lb_pseudorand_t *pr, *sort_arr = 0;
lb_new_flow_entry_t *new_flow_table = 0;
lb_as_t *as;
lb_pseudorand_t *pr, *sort_arr = 0;
ASSERT (lbm->writer_lock[0]); //We must have the lock
ASSERT (lbm->writer_lock[0]); //We must have the lock
}
//First, let's sort the ASs
}
//First, let's sort the ASs
vec_alloc(sort_arr, pool_elts(vip->as_indexes));
i = 0;
vec_alloc(sort_arr, pool_elts(vip->as_indexes));
i = 0;
-
-//Count number of changed entries
- count = 0;
- for (i=0; i<vec_len(new_flow_table); i++)
- if (vip->new_flow_table == 0 ||
- new_flow_table[i].as_index != vip->new_flow_table[i].as_index)
- count++;
old_table = vip->new_flow_table;
vip->new_flow_table = new_flow_table;
old_table = vip->new_flow_table;
vip->new_flow_table = new_flow_table;