From bc891e749fe361caeb7d7ca5208ebf1e1f4f02ac Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Thu, 26 Oct 2023 12:24:17 +0000 Subject: [PATCH] Fix an invalid condition check when detecting a lock-file change It is obvious that the '!cfg_obj_asstring(obj)' check should be 'cfg_obj_asstring(obj)' instead, because it is an AND logic chain which further uses 'obj' as a string. Fix the error. --- bin/named/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/named/server.c b/bin/named/server.c index 61d782d9dd4..a6b2c2be9b1 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -8151,7 +8151,7 @@ check_lockfile(named_server_t *server, const cfg_obj_t *config, (void)named_config_get(maps, "lock-file", &obj); if (!first_time) { - if (obj != NULL && !cfg_obj_isstring(obj) && + if (obj != NULL && cfg_obj_isstring(obj) && server->lockfile != NULL && strcmp(cfg_obj_asstring(obj), server->lockfile) != 0) { -- 2.47.3