[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r3746 - in trunk/OpenDNSSEC/signer/src: daemon signer

Matthijs Mekking matthijs at nlnetlabs.nl
Thu Aug 12 11:16:36 CEST 2010


Author: matthijs
Date: 2010-08-12 11:16:36 +0200 (Thu, 12 Aug 2010)
New Revision: 3746

Modified:
   trunk/OpenDNSSEC/signer/src/daemon/engine.c
   trunk/OpenDNSSEC/signer/src/signer/rrset.c
   trunk/OpenDNSSEC/signer/src/signer/zone.c
Log:
make valgrind more happy



Modified: trunk/OpenDNSSEC/signer/src/daemon/engine.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/daemon/engine.c	2010-08-12 08:44:41 UTC (rev 3745)
+++ trunk/OpenDNSSEC/signer/src/daemon/engine.c	2010-08-12 09:16:36 UTC (rev 3746)
@@ -432,6 +432,7 @@
             default: /* parent */
                 parent_cleanup(engine, 0);
                 xmlCleanupParser();
+                xmlCleanupGlobals();
                 xmlCleanupThreads();
                 exit(0);
         }
@@ -665,7 +666,7 @@
     if (setsid() == -1) {
         se_log_error("failed to setsid zone fetcher: %s",
             strerror(errno));
-        exit(1);
+        return 1;
     }
 
     se_log_verbose("zone fetcher started (pid=%i)", getpid());
@@ -680,6 +681,7 @@
 
     parent_cleanup(engine, 0);
     xmlCleanupParser();
+    xmlCleanupGlobals();
     xmlCleanupThreads();
     exit(result);
 
@@ -733,6 +735,7 @@
     se_log_verbose("start signer engine");
 
     /* initialize */
+    xmlInitGlobals();
     xmlInitParser();
     engine = engine_create();
     engine->daemonize = daemonize;
@@ -743,6 +746,7 @@
         se_log_error("cfgfile %s has errors", cfgfile?cfgfile:"(null)");
         engine->need_to_exit = 1;
         xmlCleanupParser();
+        xmlCleanupGlobals();
         xmlCleanupThreads();
         engine_cleanup(engine);
         engine = NULL;
@@ -751,6 +755,7 @@
     if (info) {
         engine_config_print(stdout, engine->config);
         xmlCleanupParser();
+        xmlCleanupGlobals();
         xmlCleanupThreads();
         engine_cleanup(engine);
         engine = NULL;
@@ -806,6 +811,7 @@
     engine = NULL;
     se_log_close();
     xmlCleanupParser();
+    xmlCleanupGlobals();
     xmlCleanupThreads();
     return;
 }

Modified: trunk/OpenDNSSEC/signer/src/signer/rrset.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/rrset.c	2010-08-12 08:44:41 UTC (rev 3745)
+++ trunk/OpenDNSSEC/signer/src/signer/rrset.c	2010-08-12 09:16:36 UTC (rev 3746)
@@ -565,6 +565,7 @@
                 }
                 key = key->next;
             }
+            ldns_rr_list_free(rr_list);
         } else {
             se_log_debug("reuse signatures for RRset[%i]", rrset->rr_type);
         }

Modified: trunk/OpenDNSSEC/signer/src/signer/zone.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/zone.c	2010-08-12 08:44:41 UTC (rev 3745)
+++ trunk/OpenDNSSEC/signer/src/signer/zone.c	2010-08-12 09:16:36 UTC (rev 3746)
@@ -188,6 +188,7 @@
             } else {
                 se_log_debug("zone %s has not changed",
                     zone->name?zone->name:"(null)");
+                signconf_cleanup(signconf);
             }
         }
         if (buf) {




More information about the Opendnssec-commits mailing list