From: Aram Sargsyan Date: Thu, 22 Dec 2022 13:43:47 +0000 (+0000) Subject: INSIST that active quota is 0 in destroy_adbentry() X-Git-Tag: v9.19.9~59^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7ba26c3d6f3cd159593c8f3ec19a2f1c3d50dd6;p=thirdparty%2Fbind9.git INSIST that active quota is 0 in destroy_adbentry() This should catch ADB quota management errors in the resolver. --- diff --git a/lib/dns/adb.c b/lib/dns/adb.c index d096c6185de..523f5709d41 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -1173,11 +1173,15 @@ destroy_adbentry(dns_adbentry_t *entry) { dns_adblameinfo_t *li = NULL; dns_adb_t *adb = entry->adb; + uint_fast32_t active; entry->magic = 0; INSIST(ISC_LIST_EMPTY(entry->nhs)); + active = atomic_load_acquire(&entry->active); + INSIST(active == 0); + if (entry->cookie != NULL) { isc_mem_put(adb->mctx, entry->cookie, entry->cookielen); }