mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 04:40:00 -04:00
4221. [bug] Resource leak on DNS_R_NXDOMAIN in fctx_create.
[RT #40583]
(cherry picked from commit 8d80b4939d)
This commit is contained in:
parent
e0b2257691
commit
2a3ee10260
2 changed files with 9 additions and 5 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
4221. [bug] Resource leak on DNS_R_NXDOMAIN in fctx_create.
|
||||
[RT #40583]
|
||||
|
||||
4220. [doc] Improve documentation for zone-statistics.
|
||||
[RT #36955]
|
||||
|
||||
|
|
|
|||
|
|
@ -4272,13 +4272,12 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
|||
&fctx->nameservers,
|
||||
NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_name;
|
||||
goto cleanup_nameservers;
|
||||
|
||||
result = dns_name_dup(domain, mctx, &fctx->domain);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_rdataset_disassociate(&fctx->nameservers);
|
||||
goto cleanup_name;
|
||||
}
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_nameservers;
|
||||
|
||||
fctx->ns_ttl = fctx->nameservers.ttl;
|
||||
fctx->ns_ttl_ok = ISC_TRUE;
|
||||
} else {
|
||||
|
|
@ -4408,6 +4407,8 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
|||
cleanup_domain:
|
||||
if (dns_name_countlabels(&fctx->domain) > 0)
|
||||
dns_name_free(&fctx->domain, mctx);
|
||||
|
||||
cleanup_nameservers:
|
||||
if (dns_rdataset_isassociated(&fctx->nameservers))
|
||||
dns_rdataset_disassociate(&fctx->nameservers);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue