From 785d021d00ed178a6c778cbc0a36885289cc9cc7 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 18 Jul 2022 18:00:30 +1000 Subject: [PATCH] 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 } --- lib/ns/xfrout.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/lib/ns/xfrout.c b/lib/ns/xfrout.c index 5313a50425..b41c89a621 100644 --- a/lib/ns/xfrout.c +++ b/lib/ns/xfrout.c @@ -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); }