From b6c3a2f172eee0dd9c734bdc0ea61ab265cb38c7 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 5 Feb 2020 16:07:31 +1100 Subject: [PATCH] remove dead cleanup code. 13836 if (zone != NULL) 13837 dns_zone_detach(&zone); null: At condition dz != NULL, the value of dz must be NULL. dead_error_condition: The condition dz != NULL cannot be true. 13838 if (dz != NULL) { CID 1453456 (#1 of 1): Logically dead code (DEADCODE) dead_error_begin: Execution cannot reach this statement: dns_zone_detach(&dz->zone);. 13839 dns_zone_detach(&dz->zone); 13840 isc_mem_put(named_g_mctx, dz, sizeof(*dz)); 13841 } --- bin/named/server.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bin/named/server.c b/bin/named/server.c index f7f0f7dd16..0af78773b8 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -13835,10 +13835,6 @@ named_server_delzone(named_server_t *server, isc_lex_t *lex, dns_zone_detach(&raw); if (zone != NULL) dns_zone_detach(&zone); - if (dz != NULL) { - dns_zone_detach(&dz->zone); - isc_mem_put(named_g_mctx, dz, sizeof(*dz)); - } return (result); }