From 50a2fce68f891293743e052dba0f3b39be53e51e Mon Sep 17 00:00:00 2001 From: Colin Vidal Date: Thu, 2 Apr 2026 10:48:41 +0200 Subject: [PATCH] remove deadcode in `query_addbestns()` The local variable `zfname` was released in the cleanup part of the function if not NULL, but it turns out it is now always NULL at that point. The flow can get to that part only in two cases: either `zfname` is not NULL, and then it's ownership is moved to a different variable (thus, it is now NULL), or `zfname` is already NULL. Removing the bit of deadcode releasing it. --- lib/ns/query.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/ns/query.c b/lib/ns/query.c index 4853da8edba..0df029b9492 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -10778,9 +10778,6 @@ cleanup: if (zsigrdataset != NULL) { ns_client_putrdataset(client, &zsigrdataset); } - if (zfname != NULL) { - ns_client_releasename(client, &zfname); - } dns_db_detach(&zdb); } } -- 2.47.3