pimd: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-06-30 10:32:45 -04:00
parent a2f9eb822f
commit da13682c88
2 changed files with 10 additions and 0 deletions

View File

@ -115,6 +115,7 @@ static void zclient_lookup_failed(struct zclient *zlookup)
void
zclient_lookup_free (void)
{
zclient_stop (zlookup);
zclient_free (zlookup);
zlookup = NULL;
}

View File

@ -313,6 +313,8 @@ void pim_init()
void pim_terminate()
{
struct zclient *zclient;
pim_free();
/* reverse prefix_list_init */
@ -321,4 +323,11 @@ void pim_terminate()
prefix_list_reset ();
pim_vrf_terminate ();
zclient = pim_zebra_zclient_get ();
if (zclient)
{
zclient_stop (zclient);
zclient_free (zclient);
}
}