]> git.ipfire.org Git - thirdparty/bind9.git/commit
Address theoretical resource leak in dns_dt_open()
authorMark Andrews <marka@isc.org>
Sun, 21 Feb 2021 22:44:56 +0000 (09:44 +1100)
committerMark Andrews <marka@isc.org>
Mon, 22 Feb 2021 22:41:15 +0000 (09:41 +1100)
commit4e192d2fe7cbfd8a54bc4de97e80f2bd5c0c16d7
tree2656d2535ad1ed61f85679af2c2677bd59405e98
parent31da81d82b1ceb042d748e27c7469361628c8d5e
Address theoretical resource leak in dns_dt_open()

dns_dt_open() is not currently called with mode dns_dtmode_unix.

    *** CID 281489:  Resource leaks  (RESOURCE_LEAK)
    /lib/dns/dnstap.c: 983 in dns_dt_open()
    977
    978      if (!dnstap_file(handle->reader)) {
    979      CHECK(DNS_R_BADDNSTAP);
    980      }
    981      break;
    982      case dns_dtmode_unix:
       CID 281489:  Resource leaks  (RESOURCE_LEAK)
       Variable "handle" going out of scope leaks the storage it points to.
    983      return (ISC_R_NOTIMPLEMENTED);
    984      default:
    985      INSIST(0);
    986      ISC_UNREACHABLE();
    987      }
    988

(cherry picked from commit 003dd8cc700931509a6dfac4a4faab4084a2f085)
lib/dns/dnstap.c