mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
fix: usr: Fix potential resource during resolver error handling
Under specific error conditions during query processing, resources were not being properly released, which could eventually lead to unnecessary memory consumption for the server. The a potential resource leak in the resolver has been fixed. Merge branch 'ondrej/fix-pthread-primitives-usage' into 'main' See merge request isc-projects/bind9!11658
This commit is contained in:
commit
97e78c6bf4
3 changed files with 4 additions and 1 deletions
|
|
@ -3973,6 +3973,7 @@ main(int argc, char *argv[]) {
|
|||
&sign_finish);
|
||||
}
|
||||
isc_mutex_destroy(&namelock);
|
||||
isc_rwlock_destroy(&keylist_lock);
|
||||
|
||||
return vresult == ISC_R_SUCCESS ? 0 : 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ delete_ds(dns_qp_t *qp, dns_keytable_t *keytable, dns_keynode_t *knode,
|
|||
result = dns_rdata_fromstruct(&dsrdata, dns_rdataclass_in,
|
||||
dns_rdatatype_ds, ds, &b);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
RWUNLOCK(&knode->rwlock, isc_rwlocktype_write);
|
||||
RWUNLOCK(&knode->rwlock, isc_rwlocktype_read);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5121,6 +5121,8 @@ cleanup_nameservers:
|
|||
fetchctx_detach(&fctx->parent);
|
||||
}
|
||||
|
||||
dns_ede_invalidate(&fctx->edectx);
|
||||
isc_mutex_destroy(&fctx->lock);
|
||||
dns_resolver_detach(&fctx->res);
|
||||
isc_mem_putanddetach(&fctx->mctx, fctx, sizeof(*fctx));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue