summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-03-12 13:12:48 -0400
committerton31337 <3352707+ton31337@users.noreply.github.com>2024-03-13 07:09:10 +0000
commiteedbadf606aae5cfd56fa8179bd3991cc47a7fe5 (patch)
treed2a2d05214ea7a22543f252d88838fa50d6c8dc8
parenta3df790eb284de95db2b6a8ea384083c1bfdc5ea (diff)
eigrpd, mgmtd, ospf6d: frr_fini is last
I noticed that ospf6d always had a linked list memory leak. Tracking it down shows that frr_fini() shuts down the memory system and prints out memory not cleaned up. eigrpd, mgmtd and ospf6d all called cleanup functions after frr_fini leaving memory leaked that was not really leaked. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--eigrpd/eigrp_main.c3
-rw-r--r--mgmtd/mgmt_testc.c4
-rw-r--r--ospf6d/ospf6_main.c3
3 files changed, 7 insertions, 3 deletions
diff --git a/eigrpd/eigrp_main.c b/eigrpd/eigrp_main.c
index 1491c569ec..d387b9be18 100644
--- a/eigrpd/eigrp_main.c
+++ b/eigrpd/eigrp_main.c
@@ -94,10 +94,11 @@ static void sighup(void)
static void sigint(void)
{
zlog_notice("Terminating on signal");
- eigrp_terminate();
keychain_terminate();
+ eigrp_terminate();
+
exit(0);
}
diff --git a/mgmtd/mgmt_testc.c b/mgmtd/mgmt_testc.c
index 7e3ded8209..a33a55efca 100644
--- a/mgmtd/mgmt_testc.c
+++ b/mgmtd/mgmt_testc.c
@@ -133,8 +133,10 @@ static void sigusr1(void)
static void quit(int exit_code)
{
EVENT_OFF(event_timeout);
- frr_fini();
darr_free(__client_cbs.notif_xpaths);
+
+ frr_fini();
+
exit(exit_code);
}
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c
index 0e8504c529..abd4320335 100644
--- a/ospf6d/ospf6_main.c
+++ b/ospf6d/ospf6_main.c
@@ -110,9 +110,10 @@ static void __attribute__((noreturn)) ospf6_exit(int status)
ospf6_master_delete();
+ keychain_terminate();
+
frr_fini();
- keychain_terminate();
exit(status);
}