}
fname = ns_client_newname(client, dbuf, &b);
rdataset = ns_client_newrdataset(client);
- if (fname == NULL || rdataset == NULL) {
+ if (fname == NULL) {
goto cleanup;
}
if (WANTDNSSEC(client)) {
sigrdataset = ns_client_newrdataset(client);
- if (sigrdataset == NULL) {
- goto cleanup;
- }
}
/*
*/
if (sigrdataset == NULL) {
sigrdataset = ns_client_newrdataset(client);
- if (sigrdataset == NULL) {
- goto cleanup;
- }
}
version = NULL;
}
} else {
rdataset = ns_client_newrdataset(client);
- if (rdataset == NULL) {
- goto addname;
- }
}
if (sigrdataset != NULL) {
if (dns_rdataset_isassociated(sigrdataset)) {
}
} else if (WANTDNSSEC(client)) {
sigrdataset = ns_client_newrdataset(client);
- if (sigrdataset == NULL) {
- goto addname;
- }
}
if (query_isduplicate(client, fname, dns_rdatatype_a, NULL)) {
goto aaaa_lookup;
ns_client_newrdataset(client);
}
rdataset = ns_client_newrdataset(client);
- if (rdataset == NULL) {
- goto addname;
- }
- if (WANTDNSSEC(client) && sigrdataset == NULL) {
- goto addname;
- }
} else {
dns_rdataset_disassociate(rdataset);
if (sigrdataset != NULL &&
ns_statscounter_recursclients);
tmprdataset = ns_client_newrdataset(client);
- if (tmprdataset == NULL) {
- return;
- }
if (!TCP(client)) {
peeraddr = &client->peeraddr;
if (*rdatasetp == NULL) {
*rdatasetp = ns_client_newrdataset(client);
- if (*rdatasetp == NULL) {
- CTRACE(ISC_LOG_ERROR, "rpz_ready: "
- "ns_client_newrdataset failed");
- return (DNS_R_SERVFAIL);
- }
} else if (dns_rdataset_isassociated(*rdatasetp)) {
dns_rdataset_disassociate(*rdatasetp);
}
ns_statscounter_recursclients);
tmprdataset = ns_client_newrdataset(client);
- if (tmprdataset == NULL) {
- return;
- }
if (!TCP(client)) {
peeraddr = &client->peeraddr;
}
qctx->rdataset = ns_client_newrdataset(qctx->client);
- if (qctx->rdataset == NULL) {
- CCTRACE(ISC_LOG_ERROR,
- "qctx_prepare_buffers: ns_client_newrdataset failed");
- goto error;
- }
if ((WANTDNSSEC(qctx->client) || qctx->findcoveringnsec) &&
(!qctx->is_zone || dns_db_issecure(qctx->db)))
{
qctx->sigrdataset = ns_client_newrdataset(qctx->client);
- if (qctx->sigrdataset == NULL) {
- CCTRACE(ISC_LOG_ERROR,
- "qctx_prepare_buffers: "
- "ns_client_newrdataset failed (2)");
- goto error;
- }
}
return (ISC_R_SUCCESS);
-
-error:
- if (qctx->fname != NULL) {
- ns_client_releasename(qctx->client, &qctx->fname);
- }
- if (qctx->rdataset != NULL) {
- ns_client_putrdataset(qctx->client, &qctx->rdataset);
- }
-
- return (ISC_R_NOMEMORY);
}
/*
REQUIRE(client->query.fetch == NULL);
rdataset = ns_client_newrdataset(client);
- if (rdataset == NULL) {
- return (ISC_R_NOMEMORY);
- }
if (WANTDNSSEC(client)) {
sigrdataset = ns_client_newrdataset(client);
- if (sigrdataset == NULL) {
- ns_client_putrdataset(client, &rdataset);
- return (ISC_R_NOMEMORY);
- }
} else {
sigrdataset = NULL;
}
fname = ns_client_newname(client, dbuf, &b);
neg = ns_client_newrdataset(client);
negsig = ns_client_newrdataset(client);
- if (fname == NULL || neg == NULL || negsig == NULL) {
+ if (fname == NULL) {
goto cleanup;
}
dns_rdataset_disassociate(negsig);
}
- if (fname == NULL || neg == NULL || negsig == NULL) {
+ if (fname == NULL) {
goto cleanup;
}
result = dns_rdataset_getclosest(qctx->noqname, fname, neg, negsig);
}
qctx->rdataset = ns_client_newrdataset(qctx->client);
- if (qctx->rdataset == NULL) {
- break;
- }
} else {
/*
* We're not interested in this rdataset.
*/
rdataset = ns_client_newrdataset(client);
sigrdataset = ns_client_newrdataset(client);
- if (rdataset == NULL || sigrdataset == NULL) {
- goto cleanup;
- }
/*
* Look for the DS record, which may or may not be present.
dns_name_copy(qctx->client->query.qname, name);
cloneset = ns_client_newrdataset(qctx->client);
- if (cloneset == NULL) {
- result = ISC_R_NOMEMORY;
- goto cleanup;
- }
dns_rdataset_clone(rdataset, cloneset);
/*
*/
if (WANTDNSSEC(qctx->client)) {
clonesigset = ns_client_newrdataset(qctx->client);
- if (clonesigset == NULL) {
- result = ISC_R_NOMEMORY;
- goto cleanup;
- }
dns_rdataset_clone(sigrdataset, clonesigset);
sigrdatasetp = &clonesigset;
} else {
cloneset = ns_client_newrdataset(qctx->client);
clonesigset = ns_client_newrdataset(qctx->client);
- if (cloneset == NULL || clonesigset == NULL) {
- result = ISC_R_NOMEMORY;
- goto cleanup;
- }
dns_rdataset_clone(nowildrdataset, cloneset);
dns_rdataset_clone(signowildrdataset, clonesigset);
soardataset = ns_client_newrdataset(qctx->client);
sigsoardataset = ns_client_newrdataset(qctx->client);
- if (soardataset == NULL || sigsoardataset == NULL) {
- goto cleanup;
- }
/*
* Look for SOA record to construct NODATA response.
soardataset = ns_client_newrdataset(qctx->client);
sigsoardataset = ns_client_newrdataset(qctx->client);
- if (soardataset == NULL || sigsoardataset == NULL) {
- goto cleanup;
- }
/*
* Look for SOA record to construct NXDOMAIN response.
dns_name_clone(dns_db_origin(qctx->db), name);
rdataset = ns_client_newrdataset(client);
- if (rdataset == NULL) {
- CTRACE(ISC_LOG_ERROR, "unable to allocate rdataset");
- eresult = DNS_R_SERVFAIL;
- goto cleanup;
- }
if (WANTDNSSEC(client) && dns_db_issecure(qctx->db)) {
sigrdataset = ns_client_newrdataset(client);
- if (sigrdataset == NULL) {
- CTRACE(ISC_LOG_ERROR, "unable to allocate sigrdataset");
- eresult = DNS_R_SERVFAIL;
- goto cleanup;
- }
}
/*
section);
}
-cleanup:
ns_client_putrdataset(client, &rdataset);
if (sigrdataset != NULL) {
ns_client_putrdataset(client, &sigrdataset);
dns_message_gettempname(client->message, &name);
dns_name_clone(dns_db_origin(qctx->db), name);
rdataset = ns_client_newrdataset(client);
- if (rdataset == NULL) {
- CTRACE(ISC_LOG_ERROR, "query_addns: ns_client_newrdataset "
- "failed");
- eresult = DNS_R_SERVFAIL;
- goto cleanup;
- }
if (WANTDNSSEC(client) && dns_db_issecure(qctx->db)) {
sigrdataset = ns_client_newrdataset(client);
- if (sigrdataset == NULL) {
- CTRACE(ISC_LOG_ERROR, "query_addns: "
- "ns_client_newrdataset failed");
- eresult = DNS_R_SERVFAIL;
- goto cleanup;
- }
}
/*
DNS_SECTION_AUTHORITY);
}
-cleanup:
CTRACE(ISC_LOG_DEBUG(3), "query_addns: cleanup");
ns_client_putrdataset(client, &rdataset);
if (sigrdataset != NULL) {
}
fname = ns_client_newname(client, dbuf, &b);
rdataset = ns_client_newrdataset(client);
- if (fname == NULL || rdataset == NULL) {
+ if (fname == NULL) {
goto cleanup;
}
*/
if (WANTDNSSEC(client) || !is_zone) {
sigrdataset = ns_client_newrdataset(client);
- if (sigrdataset == NULL) {
- goto cleanup;
- }
}
/*
fname = ns_client_newname(client, dbuf, &b);
rdataset = ns_client_newrdataset(client);
sigrdataset = ns_client_newrdataset(client);
- if (fname == NULL || rdataset == NULL || sigrdataset == NULL) {
+ if (fname == NULL) {
goto cleanup;
}
dns_rdataset_disassociate(sigrdataset);
}
- if (fname == NULL || rdataset == NULL || sigrdataset == NULL) {
+ if (fname == NULL) {
goto cleanup;
}
/*
dns_rdataset_disassociate(sigrdataset);
}
- if (fname == NULL || rdataset == NULL || sigrdataset == NULL) {
+ if (fname == NULL) {
goto cleanup;
}
/*