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); + } }