summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-11-12 04:56:16 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-11-13 15:16:45 +0100
commitad831a4f72a887fa529cc3ba49db352aa482a06f (patch)
tree7d8a5e175f9ae543ae8dab9ed2552ba344dd2b6a
parentripd: Cleanup memory on shutdown (diff)
downloadfrr-ad831a4f72a887fa529cc3ba49db352aa482a06f.tar.xz
frr-ad831a4f72a887fa529cc3ba49db352aa482a06f.zip
ripngd: Cleanup memory on shutdown
a) routemap data was not being cleaned up b) ripng data structure was not being cleaned up Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--ripngd/ripng_main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c
index 9933dae5c..a799943be 100644
--- a/ripngd/ripng_main.c
+++ b/ripngd/ripng_main.c
@@ -66,11 +66,23 @@ static void sighup(void)
/* SIGINT handler. */
static void sigint(void)
{
+ struct vrf *vrf;
+
zlog_notice("Terminating on signal");
+ RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
+ if (!vrf->info)
+ continue;
+
+ ripng_clean(vrf->info);
+ }
+
ripng_vrf_terminate();
if_rmap_terminate();
ripng_zebra_stop();
+
+ route_map_finish();
+
frr_fini();
exit(0);
}