From: Mark Andrews Date: Thu, 23 Dec 2021 06:42:39 +0000 (+1100) Subject: Address memory leak when processing dnssec-policy clauses X-Git-Tag: v9.17.22~17^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=694440e6140bbf410b4abe3b1539491d63a43a33;p=thirdparty%2Fbind9.git Address memory leak when processing dnssec-policy clauses 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. --- diff --git a/lib/isccfg/kaspconf.c b/lib/isccfg/kaspconf.c index e1e29cd7e1e..b790c9a8d3f 100644 --- a/lib/isccfg/kaspconf.c +++ b/lib/isccfg/kaspconf.c @@ -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) {