diff options
author | Steven Luong <sluong@cisco.com> | 2022-02-08 07:59:11 -0800 |
---|---|---|
committer | Neale Ranns <neale@graphiant.com> | 2022-02-09 14:45:20 +0000 |
commit | 97866a3279b112bba64a65d073e94aa9635d03ad (patch) | |
tree | 43a8b60c3978b7771165f47637599353dd60f093 | |
parent | 63f2c7d70136761e24b19cca1f09d9cbdde66b69 (diff) |
fib: ip6 and mpls fib_table memory leaks on fib_table->ft_locks
ip6 and mpls fib_table->ft_locks memory leaked when the table is
deleted.
name tag is leaked for mpls table parsing.
Type: fix
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ife68c0ddc3a6f9437a149b308310f042799c2116
-rw-r--r-- | src/vnet/fib/ip6_fib.c | 1 | ||||
-rw-r--r-- | src/vnet/fib/mpls_fib.c | 1 | ||||
-rw-r--r-- | src/vnet/mpls/mpls.c | 5 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/fib/ip6_fib.c b/src/vnet/fib/ip6_fib.c index 708fddce66a..6c73d19d8e3 100644 --- a/src/vnet/fib/ip6_fib.c +++ b/src/vnet/fib/ip6_fib.c @@ -174,6 +174,7 @@ ip6_fib_table_destroy (u32 fib_index) { hash_unset (ip6_main.fib_index_by_table_id, fib_table->ft_table_id); } + vec_free (fib_table->ft_locks); vec_free(fib_table->ft_src_route_counts); pool_put_index(ip6_main.v6_fibs, fib_table->ft_index); pool_put(ip6_main.fibs, fib_table); diff --git a/src/vnet/fib/mpls_fib.c b/src/vnet/fib/mpls_fib.c index 0ed2413242f..34369fc000e 100644 --- a/src/vnet/fib/mpls_fib.c +++ b/src/vnet/fib/mpls_fib.c @@ -275,6 +275,7 @@ mpls_fib_table_destroy (u32 fib_index) } hash_free(mf->mf_entries); + vec_free (fib_table->ft_locks); vec_free(fib_table->ft_src_route_counts); pool_put(mpls_main.mpls_fibs, mf); pool_put(mpls_main.fibs, fib_table); diff --git a/src/vnet/mpls/mpls.c b/src/vnet/mpls/mpls.c index 4076a8980a9..0d01010feea 100644 --- a/src/vnet/mpls/mpls.c +++ b/src/vnet/mpls/mpls.c @@ -425,8 +425,9 @@ vnet_mpls_table_cmd (vlib_main_t * vm, } done: - unformat_free (line_input); - return error; + vec_free (name); + unformat_free (line_input); + return error; } /* *INDENT-ON* */ |