fib: Fix some more realloc errors
[vpp.git] / src / vnet / fib / fib_entry_src_interface.c
index 88154ef..e172577 100644 (file)
@@ -56,8 +56,10 @@ fib_entry_src_interface_path_swap (fib_entry_src_t *src,
                                   fib_path_list_flags_t pl_flags,
                                   const fib_route_path_t *paths)
 {
+    fib_node_index_t fib_entry_index;
     ip_adjacency_t *adj;
 
+    fib_entry_index = fib_entry_get_index(entry);
     src->fes_pl = fib_path_list_create(pl_flags, paths);
 
     /*
@@ -69,7 +71,8 @@ fib_entry_src_interface_path_swap (fib_entry_src_t *src,
         adj_index_t ai;
 
         ai = fib_path_list_get_adj(src->fes_pl,
-                                   fib_entry_get_default_chain_type(entry));
+                                   fib_entry_get_default_chain_type(
+                                       fib_entry_get(fib_entry_index)));
         if (INDEX_INVALID != ai)
         {
             adj = adj_get(ai);