]> 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)
committerMark Andrews <marka@isc.org>
Mon, 3 Jan 2022 22:04:07 +0000 (09:04 +1100)
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.

(cherry picked from commit 694440e6140bbf410b4abe3b1539491d63a43a33)

lib/isccfg/kaspconf.c

index 8a119fb612166cbd72d10222348795b3aed35732..15433d9f903031763bce76a415762cff030d5adb 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) {