2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 01:59:26 +00:00

Disassociate added rdataset on error in cache_rrset()

When first dns_db_addrdataset() succeeds in cache_rrset(), but the
second one fails with error, the added rdataset was kept associated.
This caused assertion failure down the pipe in fctx_sendevents().
This commit is contained in:
Ondřej Surý 2025-08-18 17:11:03 +02:00
parent 6d8c0b2a8d
commit 7f9647d16e
No known key found for this signature in database
GPG Key ID: 2820F37E873DEA41

View File

@ -5286,6 +5286,9 @@ cache_rrset(fetchctx_t *fctx, isc_stdtime_t now, dns_name_t *name,
if (result == ISC_R_SUCCESS && sigrdataset != NULL) {
result = dns_db_addrdataset(fctx->cache, node, NULL, now,
sigrdataset, options, addedsig);
if (result != ISC_R_SUCCESS && result != DNS_R_UNCHANGED) {
dns__rdataset_disassociate(added);
}
}
if (result == DNS_R_UNCHANGED) {