From d2aafaf5b68372b3520ee8406a52125119dc32db Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 11 Nov 2023 22:57:24 -0500 Subject: ospfd: Cleanup route-map memory Signed-off-by: Donald Sharp --- ospfd/ospf_main.c | 1 + ospfd/ospfd.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index dd000241f..a2a1c4a94 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -89,6 +89,7 @@ static void sigint(void) zlog_notice("Terminating on signal"); bfd_protocol_integration_set_shutdown(true); ospf_terminate(); + exit(0); } diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 9ed1d301f..c46d2e278 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -595,6 +595,7 @@ static void ospf_deferred_shutdown_finish(struct ospf *ospf) /* ospfd being shut-down? If so, was this the last ospf instance? */ if (CHECK_FLAG(om->options, OSPF_MASTER_SHUTDOWN) && (listcount(om->ospf) == 0)) { + route_map_finish(); frr_fini(); exit(0); } @@ -678,6 +679,7 @@ void ospf_terminate(void) /* Cleanup vrf info */ ospf_vrf_terminate(); + route_map_finish(); /* Deliberately go back up, hopefully to thread scheduler, as * One or more ospf_finish()'s may have deferred shutdown to a timer * thread -- cgit v1.2.3