diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-03-23 14:08:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-23 14:08:29 +0200 |
| commit | 6927446645221898256a6ec37653bb31a301db72 (patch) | |
| tree | 3039c1a7b7ee98a0da74fe99f7f9ef571825a3fa /zebra/zebra_mpls.c | |
| parent | 9cc377d4d7ccae8a318d0162c5d0d6a6754d8b0a (diff) | |
| parent | d8bc11a592110abdd14d11dfcb2ce623653ecab5 (diff) | |
Merge pull request #13074 from donaldsharp/hash_clean_and_free
*: Add a hash_clean_and_free() function
Diffstat (limited to 'zebra/zebra_mpls.c')
| -rw-r--r-- | zebra/zebra_mpls.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 4c2d546126..4aaf6f25af 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -4058,10 +4058,8 @@ static void lsp_table_free(void *p) void zebra_mpls_close_tables(struct zebra_vrf *zvrf) { hash_iterate(zvrf->lsp_table, lsp_uninstall_from_kernel, NULL); - hash_clean(zvrf->lsp_table, lsp_table_free); - hash_free(zvrf->lsp_table); - hash_clean(zvrf->slsp_table, lsp_table_free); - hash_free(zvrf->slsp_table); + hash_clean_and_free(&zvrf->lsp_table, lsp_table_free); + hash_clean_and_free(&zvrf->slsp_table, lsp_table_free); route_table_finish(zvrf->fec_table[AFI_IP]); route_table_finish(zvrf->fec_table[AFI_IP6]); } |
