[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r4039 - trunk/OpenDNSSEC/enforcer/utils

Sion Lloyd sion at nominet.org.uk
Fri Oct 1 11:43:40 CEST 2010


Author: sion
Date: 2010-10-01 11:43:39 +0200 (Fri, 01 Oct 2010)
New Revision: 4039

Modified:
   trunk/OpenDNSSEC/enforcer/utils/ksmutil.c
Log:
Fix issues with purging multiple policies, pivotal story 985083.


Modified: trunk/OpenDNSSEC/enforcer/utils/ksmutil.c
===================================================================
--- trunk/OpenDNSSEC/enforcer/utils/ksmutil.c	2010-09-30 09:46:12 UTC (rev 4038)
+++ trunk/OpenDNSSEC/enforcer/utils/ksmutil.c	2010-10-01 09:43:39 UTC (rev 4039)
@@ -3193,9 +3193,9 @@
                     /* Save our new file over the old, TODO should we validate it first? */
                     status = xmlSaveFormatFile(kasp_filename, doc, 1);
                     xmlFreeDoc(doc);
-                    StrFree(kasp_filename);
                     if (status == -1) {
                         printf("Could not save %s\n", kasp_filename);
+                        StrFree(kasp_filename);
                         db_disconnect(lock_fd);
                         return(1);
                     }
@@ -3226,6 +3226,8 @@
         DbRollback();
     }
 
+    StrFree(kasp_filename);
+    db_disconnect(lock_fd);
     return status;
 }
 
@@ -5725,7 +5727,7 @@
         {
             xmlUnlinkNode(cur);
 
-            cur = root->children; /* May pass through multiple times, but will remove all instances of the zone */
+            cur = root->children; /* May pass through multiple times, but will remove all instances of the policy */
         }
     }
     xmlFreeNode(cur);




More information about the Opendnssec-commits mailing list