From: Ondřej Surý Date: Tue, 10 Mar 2026 10:30:54 +0000 (+0100) Subject: Fix missing mutex destroy and ede invalidate on fctx_create() error paths X-Git-Tag: v9.21.21~32^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b1750f15fe9e5b7914419dab23bef1e7e72d13e;p=thirdparty%2Fbind9.git Fix missing mutex destroy and ede invalidate on fctx_create() error paths The error cleanup in fctx_create() was missing isc_mutex_destroy() and dns_ede_invalidate() calls. When error paths (cleanup_nameservers, cleanup_fcount, cleanup_qmessage, cleanup_adb) were taken after the mutex and edectx were initialized, the fctx memory was freed without properly destroying these resources first. --- diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 20763e612c4..a708bd0f0b1 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -5121,6 +5121,8 @@ cleanup_nameservers: fetchctx_detach(&fctx->parent); } + dns_ede_invalidate(&fctx->edectx); + isc_mutex_destroy(&fctx->lock); dns_resolver_detach(&fctx->res); isc_mem_putanddetach(&fctx->mctx, fctx, sizeof(*fctx));