From: Ondřej Surý Date: Thu, 3 Oct 2019 08:16:03 +0000 (+0200) Subject: lib/dns/zone.c: Fix invalid order of DbC checks that could cause dereference before... X-Git-Tag: v9.14.8~37^2~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=fedfd48a089450a8358742084c38fcfa443aeb9d;p=thirdparty%2Fbind9.git lib/dns/zone.c: Fix invalid order of DbC checks that could cause dereference before NULL check --- diff --git a/lib/dns/zone.c b/lib/dns/zone.c index be0865c891c..c568e6a4469 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -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++;