From: Evan Hunt Date: Mon, 11 Jul 2022 23:55:48 +0000 (-0700) Subject: clear fctx->magic and fetch->magic when destroying X-Git-Tag: v9.19.4~38^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ec077e6aad95d654d723862683ae7941d59083c;p=thirdparty%2Fbind9.git clear fctx->magic and fetch->magic when destroying fctx_destroy() and dns_resolver_destroyfetch() did not clear the 'magic' field during destruction. --- diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 984765e19f4..e10404859d9 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -4360,6 +4360,8 @@ fctx_destroy(fetchctx_t *fctx) { FCTXTRACE("destroy"); + fctx->magic = 0; + res = fctx->res; bucket = fctx->bucket; @@ -10866,6 +10868,8 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp) { FTRACE("destroyfetch"); + fetch->magic = 0; + LOCK(&fctx->bucket->lock); /*