mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 06:53:03 +00:00
Merge pull request #11635 from opensourcerouting/fix/memory_leak_for_mpls
zebra: Cleanup the memory from the hash for MPLS stuff
This commit is contained in:
commit
13d7231039
@ -4005,6 +4005,13 @@ void zebra_mpls_client_cleanup_vrf_label(uint8_t proto)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void lsp_table_free(void *p)
|
||||||
|
{
|
||||||
|
struct zebra_lsp *lsp = p;
|
||||||
|
|
||||||
|
XFREE(MTYPE_LSP, lsp);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called upon process exiting, need to delete LSP forwarding
|
* Called upon process exiting, need to delete LSP forwarding
|
||||||
* entries from the kernel.
|
* entries from the kernel.
|
||||||
@ -4013,9 +4020,9 @@ void zebra_mpls_client_cleanup_vrf_label(uint8_t proto)
|
|||||||
void zebra_mpls_close_tables(struct zebra_vrf *zvrf)
|
void zebra_mpls_close_tables(struct zebra_vrf *zvrf)
|
||||||
{
|
{
|
||||||
hash_iterate(zvrf->lsp_table, lsp_uninstall_from_kernel, NULL);
|
hash_iterate(zvrf->lsp_table, lsp_uninstall_from_kernel, NULL);
|
||||||
hash_clean(zvrf->lsp_table, NULL);
|
hash_clean(zvrf->lsp_table, lsp_table_free);
|
||||||
hash_free(zvrf->lsp_table);
|
hash_free(zvrf->lsp_table);
|
||||||
hash_clean(zvrf->slsp_table, NULL);
|
hash_clean(zvrf->slsp_table, lsp_table_free);
|
||||||
hash_free(zvrf->slsp_table);
|
hash_free(zvrf->slsp_table);
|
||||||
route_table_finish(zvrf->fec_table[AFI_IP]);
|
route_table_finish(zvrf->fec_table[AFI_IP]);
|
||||||
route_table_finish(zvrf->fec_table[AFI_IP6]);
|
route_table_finish(zvrf->fec_table[AFI_IP6]);
|
||||||
|
Loading…
Reference in New Issue
Block a user