mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 13:31:48 +00:00
Merge pull request #3082 from donaldsharp/memory
pimd: Fix several address sanitizer issues
This commit is contained in:
commit
caca1bff12
@ -44,10 +44,10 @@ static void pim_instance_terminate(struct pim_instance *pim)
|
||||
if (pim->static_routes)
|
||||
list_delete_and_null(&pim->static_routes);
|
||||
|
||||
pim_rp_free(pim);
|
||||
|
||||
pim_upstream_terminate(pim);
|
||||
|
||||
pim_rp_free(pim);
|
||||
|
||||
/* Traverse and cleanup rpf_hash */
|
||||
if (pim->rpf_hash) {
|
||||
hash_clean(pim->rpf_hash, (void *)pim_rp_list_hash_clean);
|
||||
|
@ -1534,12 +1534,13 @@ unsigned int pim_upstream_hash_key(void *arg)
|
||||
|
||||
void pim_upstream_terminate(struct pim_instance *pim)
|
||||
{
|
||||
struct listnode *node, *nnode;
|
||||
struct pim_upstream *up;
|
||||
|
||||
if (pim->upstream_list) {
|
||||
for (ALL_LIST_ELEMENTS(pim->upstream_list, node, nnode, up))
|
||||
while (pim->upstream_list->count) {
|
||||
up = listnode_head(pim->upstream_list);
|
||||
pim_upstream_del(pim, up, __PRETTY_FUNCTION__);
|
||||
}
|
||||
|
||||
list_delete_and_null(&pim->upstream_list);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user