]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1433. [bug] named could trigger a REQUIRE failure if it could
authorMark Andrews <marka@isc.org>
Wed, 26 Feb 2003 03:06:46 +0000 (03:06 +0000)
committerMark Andrews <marka@isc.org>
Wed, 26 Feb 2003 03:06:46 +0000 (03:06 +0000)
                        not get a file descriptor when attempting to write
                        a master file. [RT #4347]
developer: marka
reviewer: explorer

CHANGES
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index f8a0d763f634cb7d1740933a6f6163bf428022fc..d7a184c50f59cf92c1b30f2392593a2b8bd71a1b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1433.  [bug]           named could trigger a REQUIRE failure if it could
+                       not get a file descriptor when attempting to write
+                       a master file. [RT #4347]
+
 1432.  [func]          The advertised EDNS UDP buffer size can now be set
                        via named.conf (edns-udp-size).
 
index 4f50e3328c06769c74e247413425d77427ae118f..219961fde8c935df4b4d77b67a7a707f8ab1eb57 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.382 2003/02/07 01:54:56 marka Exp $ */
+/* $Id: zone.c,v 1.383 2003/02/26 03:06:46 marka Exp $ */
 
 #include <config.h>
 
@@ -2261,17 +2261,17 @@ dump_done(void *arg, isc_result_t result) {
 
        ENTER;
 
-       /*
-        * We don't own these, zone->dctx must stay valid.
-        */
-       db = dns_dumpctx_db(zone->dctx);
-       version = dns_dumpctx_version(zone->dctx);
-
        if (result == ISC_R_SUCCESS && zone->journal != NULL &&
            zone->journalsize != -1) {
                isc_uint32_t serial;
                isc_result_t tresult;
 
+               /*
+                * We don't own these, zone->dctx must stay valid.
+                */
+               db = dns_dumpctx_db(zone->dctx);
+               version = dns_dumpctx_version(zone->dctx);
+
                tresult = dns_db_getsoaserial(db, version, &serial);
                if (tresult == ISC_R_SUCCESS) {
                        tresult = dns_journal_compact(zone->mctx, zone->journal,
@@ -2311,7 +2311,8 @@ dump_done(void *arg, isc_result_t result) {
        } else if (result == ISC_R_SUCCESS)
                DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_FLUSH);
                
-       dns_dumpctx_detach(&zone->dctx);
+       if (zone->dctx != NULL)
+               dns_dumpctx_detach(&zone->dctx);
        UNLOCK_ZONE(zone);
        if (again)
                (void)zone_dump(zone, ISC_FALSE);