From: Mark Andrews Date: Tue, 16 Jan 2024 03:25:27 +0000 (+1100) Subject: Clear qctx->zversion X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a61be8eef0ee0ca8fd8036ccb61c6f9b728158ce;p=thirdparty%2Fbind9.git Clear qctx->zversion 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) --- diff --git a/lib/ns/query.c b/lib/ns/query.c index 1290c308af0..ec9bf5b7692 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -5260,6 +5260,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) {