Merge pull request #11606 from LabNConsulting/zebra-nbr-memleak

zebra: free neighbor state before exit to avoid memleaks
This commit is contained in:
Jafar Al-Gharaibeh 2022-07-14 15:04:22 -05:00 committed by GitHub
commit 4ffd62f09b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,8 +272,13 @@ void zebra_neigh_init(void)
void zebra_neigh_terminate(void)
{
struct zebra_neigh_ent *n, *next;
if (!zrouter.neigh_info)
return;
RB_FOREACH_SAFE (n, zebra_neigh_rb_head, &zneigh_info->neigh_rb_tree,
next)
zebra_neigh_free(n);
XFREE(MTYPE_ZNEIGH_INFO, zneigh_info);
}