mirror of
https://github.com/isc-projects/bind9.git
synced 2026-07-16 07:52:51 -04:00
Merge branch '3364-various-coverity-issues-after-dns_message_gettemp-cleanup' into 'main'
Resolve "Various Coverity issues after dns_message_gettemp* cleanup" Closes #3364 See merge request isc-projects/bind9!6588
This commit is contained in:
commit
5267a25b17
4 changed files with 5 additions and 43 deletions
|
|
@ -4617,15 +4617,9 @@ dns_message_buildopt(dns_message_t *message, dns_rdataset_t **rdatasetp,
|
|||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
if (rdata != NULL) {
|
||||
dns_message_puttemprdata(message, &rdata);
|
||||
}
|
||||
if (rdataset != NULL) {
|
||||
dns_message_puttemprdataset(message, &rdataset);
|
||||
}
|
||||
if (rdatalist != NULL) {
|
||||
dns_message_puttemprdatalist(message, &rdatalist);
|
||||
}
|
||||
dns_message_puttemprdata(message, &rdata);
|
||||
dns_message_puttemprdataset(message, &rdataset);
|
||||
dns_message_puttemprdatalist(message, &rdatalist);
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1391,15 +1391,7 @@ xfrin_send_request(dns_xfrin_ctx_t *xfr) {
|
|||
isc_nm_send(xfr->handle, ®ion, xfrin_send_done, send_xfr);
|
||||
|
||||
failure:
|
||||
if (qname != NULL) {
|
||||
dns_message_puttempname(msg, &qname);
|
||||
}
|
||||
if (qrdataset != NULL) {
|
||||
dns_message_puttemprdataset(msg, &qrdataset);
|
||||
}
|
||||
if (msg != NULL) {
|
||||
dns_message_detach(&msg);
|
||||
}
|
||||
dns_message_detach(&msg);
|
||||
if (soatuple != NULL) {
|
||||
dns_difftuple_free(&soatuple);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8324,10 +8324,6 @@ cleanup:
|
|||
isc_buffer_free(&buffer);
|
||||
}
|
||||
|
||||
if (dns64_rdata != NULL) {
|
||||
dns_message_puttemprdata(client->message, &dns64_rdata);
|
||||
}
|
||||
|
||||
if (dns64_rdataset != NULL) {
|
||||
dns_message_puttemprdataset(client->message, &dns64_rdataset);
|
||||
}
|
||||
|
|
@ -8462,10 +8458,6 @@ cleanup:
|
|||
isc_buffer_free(&buffer);
|
||||
}
|
||||
|
||||
if (myrdata != NULL) {
|
||||
dns_message_puttemprdata(client->message, &myrdata);
|
||||
}
|
||||
|
||||
if (myrdataset != NULL) {
|
||||
dns_message_puttemprdataset(client->message, &myrdataset);
|
||||
}
|
||||
|
|
@ -8480,6 +8472,7 @@ cleanup:
|
|||
}
|
||||
dns_message_puttemprdatalist(client->message, &myrdatalist);
|
||||
}
|
||||
|
||||
if (qctx->dbuf != NULL) {
|
||||
ns_client_releasename(client, &name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1563,23 +1563,6 @@ sendstream(xfrout_ctx_t *xfr) {
|
|||
CHECK(dns_message_getquerytsig(msg, xfr->mctx, &xfr->lasttsig));
|
||||
|
||||
failure:
|
||||
if (msgname != NULL) {
|
||||
if (msgrds != NULL) {
|
||||
if (dns_rdataset_isassociated(msgrds)) {
|
||||
dns_rdataset_disassociate(msgrds);
|
||||
}
|
||||
dns_message_puttemprdataset(msg, &msgrds);
|
||||
}
|
||||
if (msgrdl != NULL) {
|
||||
ISC_LIST_UNLINK(msgrdl->rdata, msgrdata, link);
|
||||
dns_message_puttemprdatalist(msg, &msgrdl);
|
||||
}
|
||||
if (msgrdata != NULL) {
|
||||
dns_message_puttemprdata(msg, &msgrdata);
|
||||
}
|
||||
dns_message_puttempname(msg, &msgname);
|
||||
}
|
||||
|
||||
if (tcpmsg != NULL) {
|
||||
dns_message_detach(&tcpmsg);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue