summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pimd/pim_zlookup.c1
-rw-r--r--pimd/pimd.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
index 779cc14183..e7ffe0f4ad 100644
--- a/pimd/pim_zlookup.c
+++ b/pimd/pim_zlookup.c
@@ -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;
}
diff --git a/pimd/pimd.c b/pimd/pimd.c
index c31d2a99a1..ec1fe5b6d0 100644
--- a/pimd/pimd.c
+++ b/pimd/pimd.c
@@ -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);
+ }
}