Remove dead code

*** CID 352817:  Control flow issues  (DEADCODE) /lib/ns/xfrout.c: 1568 in sendstream()
    1562
    1563     	/* Advance lasttsig to be the last TSIG generated */
    1564     	CHECK(dns_message_getquerytsig(msg, xfr->mctx, &xfr->lasttsig));
    1565
    1566     failure:
    1567     	if (msgname != NULL) {
    >>>     CID 352817:  Control flow issues  (DEADCODE)
    >>>     Execution cannot reach this statement: "if (msgrds != NULL) {
      if ...".
    1568     		if (msgrds != NULL) {
    1569     			if (dns_rdataset_isassociated(msgrds)) {
    1570     				dns_rdataset_disassociate(msgrds);
    1571     			}
    1572     			dns_message_puttemprdataset(msg, &msgrds);
    1573     		}
This commit is contained in:
Mark Andrews
2022-07-18 18:00:30 +10:00
parent 5805457d9d
commit 785d021d00

View File

@@ -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);
}