]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Clear qctx->zversion
authorMark Andrews <marka@isc.org>
Tue, 16 Jan 2024 03:25:27 +0000 (14:25 +1100)
committerNicki Křížek <nicki@isc.org>
Mon, 10 Jun 2024 17:20:06 +0000 (19:20 +0200)
Clear qctx->zversion when clearing qctx->zrdataset et al in
lib/ns/query.c:qctx_freedata.  The uncleared pointer could lead to
an assertion failure if zone data needed to be re-saved which could
happen with stale data support enabled.

(cherry picked from commit 179fb3532ab8d4898ab070b2db54c0ce872ef709)

lib/ns/query.c

index 37b0d0ab0dc4e1bc1a81d36bb4216db78ca5fc59..132a151bedb15ad082a2cf0dacb662448e28f294 100644 (file)
@@ -5325,6 +5325,7 @@ qctx_freedata(query_ctx_t *qctx) {
                ns_client_releasename(qctx->client, &qctx->zfname);
                dns_db_detachnode(qctx->zdb, &qctx->znode);
                dns_db_detach(&qctx->zdb);
+               qctx->zversion = NULL;
        }
 
        if (qctx->event != NULL && !qctx->client->nodetach) {