From c91dc92410f15d1c93c70d2c596350eee7748958 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 6 Jul 2020 13:16:33 +1000 Subject: [PATCH] Remove redundant check for listener being non-NULL --- bin/named/controlconf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index bab50ae8e0..6d6e4078d7 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -1256,10 +1256,8 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp, "command channel listening on %s", socktext); *listenerp = listener; } else { - if (listener != NULL) { - listener->exiting = true; - free_listener(listener); - } + listener->exiting = true; + free_listener(listener); if (control != NULL) { cfg_obj_log(control, named_g_lctx, ISC_LOG_WARNING,