]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove dead code
authorMark Andrews <marka@isc.org>
Mon, 18 Jul 2022 08:00:30 +0000 (18:00 +1000)
committerMark Andrews <marka@isc.org>
Tue, 6 Sep 2022 12:47:08 +0000 (12:47 +0000)
    *** 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

index 5313a504258c8261433bf5bda5f0b11d40910450..b41c89a621356897981a43430e8cfd1033a2ad8e 100644 (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);
        }