MFIB memory leak. free the per-source interface hash
Change-Id: I0ccb337eb0ed50ccc64193533cd816f6e36e6db5
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/src/vnet/fib/mpls_fib.c b/src/vnet/fib/mpls_fib.c
index cc65797..5cd0fd2 100644
--- a/src/vnet/fib/mpls_fib.c
+++ b/src/vnet/fib/mpls_fib.c
@@ -272,7 +272,7 @@
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);
}
diff --git a/src/vnet/mfib/mfib_entry.c b/src/vnet/mfib/mfib_entry.c
index 1947360..117ddc2 100644
--- a/src/vnet/mfib/mfib_entry.c
+++ b/src/vnet/mfib/mfib_entry.c
@@ -292,6 +292,8 @@
({
mfib_itf_delete(mfib_itf_get(mfii));
}));
+ hash_free(msrc->mfes_itfs);
+ msrc->mfes_itfs = NULL;
fib_path_list_unlock(msrc->mfes_pl);
}
diff --git a/src/vppinfra/hash.h b/src/vppinfra/hash.h
index 3f0efaa..4db5a57 100644
--- a/src/vppinfra/hash.h
+++ b/src/vppinfra/hash.h
@@ -683,11 +683,6 @@
/* Main test routine. */
int test_hash_main (unformat_input_t * input);
-static inline void
-hash_delete (void *bob)
-{
-}
-
#endif /* included_hash_h */
/*