]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
remove deadcode in `query_addbestns()`
authorColin Vidal <colin@isc.org>
Thu, 2 Apr 2026 08:48:41 +0000 (10:48 +0200)
committerColin Vidal <colin@isc.org>
Thu, 2 Apr 2026 09:51:12 +0000 (11:51 +0200)
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

index 4853da8edba9288b7810313dbf392aa68eee148b..0df029b9492c1b7974ccf38414e1f588b6466223 100644 (file)
@@ -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);
        }
 }