mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-23 18:47:40 -04:00
fix: dev: 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(). Merge branch 'ondrej/disassociate-added-on-error-in-cache_rrset' into 'main' See merge request isc-projects/bind9!10861
This commit is contained in:
commit
018ff7b294
1 changed files with 3 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue