]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
lib/dns/zone.c: Fix invalid order of DbC checks that could cause dereference before...
authorOndřej Surý <ondrej@sury.org>
Thu, 3 Oct 2019 08:16:03 +0000 (10:16 +0200)
committerOndřej Surý <ondrej@sury.org>
Thu, 3 Oct 2019 08:16:03 +0000 (10:16 +0200)
lib/dns/zone.c

index be0865c891c93be38bfb531eaf66e144573414c4..c568e6a4469ebe8dfc6462227aa40f4fc8038e4c 100644 (file)
@@ -5507,8 +5507,8 @@ zone_iattach(dns_zone_t *source, dns_zone_t **target) {
        /*
         * 'source' locked by caller.
         */
-       REQUIRE(LOCKED_ZONE(source));
        REQUIRE(DNS_ZONE_VALID(source));
+       REQUIRE(LOCKED_ZONE(source));
        REQUIRE(target != NULL && *target == NULL);
        INSIST(source->irefs + isc_refcount_current(&source->erefs) > 0);
        source->irefs++;