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

Rickard Bellgrim rickard.bellgrim at iis.se
Mon Oct 18 12:07:59 CEST 2010


Author: rb
Date: 2010-10-18 12:07:59 +0200 (Mon, 18 Oct 2010)
New Revision: 4122

Modified:
   trunk/OpenDNSSEC/signer/src/scheduler/task.c
   trunk/OpenDNSSEC/signer/src/signer/zonedata.c
Log:
Fix some memory leaks. ALso added a TODO. Valgrind did not show this one, but it feels like it should be freed.


Modified: trunk/OpenDNSSEC/signer/src/scheduler/task.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/scheduler/task.c	2010-10-18 09:18:03 UTC (rev 4121)
+++ trunk/OpenDNSSEC/signer/src/scheduler/task.c	2010-10-18 10:07:59 UTC (rev 4122)
@@ -111,6 +111,7 @@
             task->flush = flush;
             task->backoff = backoff;
         }
+        se_free((void*)who);
         se_fclose(fd);
         return task;
     }

Modified: trunk/OpenDNSSEC/signer/src/signer/zonedata.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/zonedata.c	2010-10-18 09:18:03 UTC (rev 4121)
+++ trunk/OpenDNSSEC/signer/src/signer/zonedata.c	2010-10-18 10:07:59 UTC (rev 4122)
@@ -127,6 +127,7 @@
                     } else {
                         current_domain->parent =
                             zonedata_lookup_domain(zd, parent_rdf);
+                        /* TODO: ldns_rdf_deep_free(parent_rdf); ??? */
                         se_log_assert(current_domain->parent ||
                             current_domain->domain_status == DOMAIN_STATUS_APEX);
 
@@ -521,6 +522,7 @@
         if (!parent_domain) {
             se_log_deeebug("create parent domain for %s", str);
             parent_domain = domain_create(parent_rdf);
+            ldns_rdf_deep_free(parent_rdf);
             se_log_deeebug("add parent domain to %s", str);
             parent_domain = zonedata_add_domain(zd, parent_domain);
             if (!parent_domain) {
@@ -987,8 +989,6 @@
     while (parent_rdf && ldns_dname_is_subdomain(parent_rdf, apex) &&
            ldns_dname_compare(parent_rdf, apex) != 0) {
 
-        str_name = ldns_rdf2str(parent_rdf);
-
         parent_domain = zonedata_lookup_domain(zd, parent_rdf);
         next_rdf = ldns_dname_left_chop(parent_rdf);
         ldns_rdf_deep_free(parent_rdf);




More information about the Opendnssec-commits mailing list