]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
INSIST that the zone in locked before unlocking
authorMark Andrews <marka@isc.org>
Mon, 28 Oct 2024 23:12:20 +0000 (10:12 +1100)
committerMark Andrews <marka@isc.org>
Fri, 6 Dec 2024 04:23:31 +0000 (04:23 +0000)
This is the counterpart to the INSIST(!zone->locked) when the zone
is locked.

lib/dns/zone.c

index c1f639f941b4ab1d76deee3e4890211040139bd2..e0c186ff8fdde8c87fc828b5f05c6cd9516c0fbb 100644 (file)
@@ -193,6 +193,7 @@ typedef struct dns_include dns_include_t;
        } while (0)
 #define UNLOCK_ZONE(z)               \
        do {                         \
+               INSIST((z)->locked); \
                (z)->locked = false; \
                UNLOCK(&(z)->lock);  \
        } while (0)