From 73ff8850bf48b8e136f8aa4c86076da99ffdd5bf Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Mon, 11 Apr 2022 17:29:03 -0700 Subject: [PATCH] ADB entries could be unlinked too soon due to a typo in the code, ADB entries were unlinked from their entry buckets during shutdown if they had a nonzero reference count. they were only supposed to be unlinked if the reference count was exactly one (that being the reference held by the bucket itself). --- lib/dns/adb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/adb.c b/lib/dns/adb.c index ae616710a4..edce5bf18c 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -1009,7 +1009,7 @@ shutdown_entries(dns_adb_t *adb) { * entries not in use. */ next_entry = ISC_LIST_NEXT(entry, plink); - if (isc_refcount_current(&entry->references) && + if (isc_refcount_current(&entry->references) == 1 && entry->expires == 0) { unlink_entry(entry); }