]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
clear fctx->magic and fetch->magic when destroying
authorEvan Hunt <each@isc.org>
Mon, 11 Jul 2022 23:55:48 +0000 (16:55 -0700)
committerMark Andrews <marka@isc.org>
Tue, 12 Jul 2022 23:40:47 +0000 (23:40 +0000)
fctx_destroy() and dns_resolver_destroyfetch() did not clear the
'magic' field during destruction.

lib/dns/resolver.c

index 984765e19f472c0759526b579a4d40d5c73fbace..e10404859d90fc42048d3a082ec80a6b92e98eb5 100644 (file)
@@ -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);
 
        /*