MFIB memory leak. free the per-source interface hash 08/5508/2
authorNeale Ranns <nranns@cisco.com>
Fri, 24 Feb 2017 09:34:14 +0000 (01:34 -0800)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 24 Feb 2017 11:16:25 +0000 (11:16 +0000)
Change-Id: I0ccb337eb0ed50ccc64193533cd816f6e36e6db5
Signed-off-by: Neale Ranns <nranns@cisco.com>
src/vnet/fib/mpls_fib.c
src/vnet/mfib/mfib_entry.c
src/vppinfra/hash.h

index cc65797..5cd0fd2 100644 (file)
@@ -272,7 +272,7 @@ mpls_fib_table_destroy (mpls_fib_t *mf)
        hash_unset(mpls_main.fib_index_by_table_id,
                   fib_table->ft_table_id);
     }
-    hash_delete(mf->mf_entries);
+    hash_free(mf->mf_entries);
 
     pool_put(mpls_main.fibs, fib_table);
 }
index 1947360..117ddc2 100644 (file)
@@ -292,6 +292,8 @@ mfib_entry_src_flush (mfib_entry_src_t *msrc)
     ({
         mfib_itf_delete(mfib_itf_get(mfii));
     }));
+    hash_free(msrc->mfes_itfs);
+    msrc->mfes_itfs = NULL;
     fib_path_list_unlock(msrc->mfes_pl);
 }
 
index 3f0efaa..4db5a57 100644 (file)
@@ -683,11 +683,6 @@ unformat_function_t unformat_hash_string;
 /* Main test routine. */
 int test_hash_main (unformat_input_t * input);
 
-static inline void
-hash_delete (void *bob)
-{
-}
-
 #endif /* included_hash_h */
 
 /*