]> git.puffer.fish Git - mirror/frr.git/commitdiff
eigrpd, mgmtd, ospf6d: frr_fini is last 15531/head
authorDonald Sharp <sharpd@nvidia.com>
Tue, 12 Mar 2024 17:12:48 +0000 (13:12 -0400)
committerton31337 <3352707+ton31337@users.noreply.github.com>
Wed, 13 Mar 2024 07:09:10 +0000 (07:09 +0000)
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>
eigrpd/eigrp_main.c
mgmtd/mgmt_testc.c
ospf6d/ospf6_main.c

index 1491c569ec5984d52c23d1f141c69bad4b4a3f6c..d387b9be1804f635bc8a379bd31ecd660511209d 100644 (file)
@@ -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);
 }
 
index 7e3ded8209e60b2e30e8a8e3770310bec7c3f7be..a33a55efcab3b387786be3e3bbd2c9f712cdf6fe 100644 (file)
@@ -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);
 }
 
index 0e8504c5298ff919b32c05fd85e7ff8484f64ef0..abd43203357c2a3870be9710233b12cf77666cd9 100644 (file)
@@ -110,9 +110,10 @@ static void __attribute__((noreturn)) ospf6_exit(int status)
 
        ospf6_master_delete();
 
+       keychain_terminate();
+
        frr_fini();
 
-       keychain_terminate();
        exit(status);
 }