]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Address memory leak when processing dnssec-policy clauses
authorMark Andrews <marka@isc.org>
Thu, 23 Dec 2021 06:42:39 +0000 (17:42 +1100)
committerEvan Hunt <each@isc.org>
Mon, 3 Jan 2022 19:47:33 +0000 (11:47 -0800)
A kasp structure was not detached when looking to see if there
was an existing kasp structure with the same name, causing memory
to be leaked.  Fixed by calling dns_kasp_detach() to release the
reference.

lib/isccfg/kaspconf.c

index e1e29cd7e1e5ed450b5876dd7097143ac6af0e79..b790c9a8d3f78c33b233a98256c243cb40b5e85b 100644 (file)
@@ -272,6 +272,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, const char *name, isc_mem_t *mctx,
        result = dns_kasplist_find(kasplist, kaspname, &kasp);
 
        if (result == ISC_R_SUCCESS) {
+               dns_kasp_detach(&kasp);
                return (ISC_R_EXISTS);
        }
        if (result != ISC_R_NOTFOUND) {