From 7ce1f3d87227e14cd37636916fa6f45280521c0c Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Wed, 31 Aug 2022 13:18:39 +0000 Subject: [PATCH] Use the return value of isc_portset_create() There is an omission of assigning the return value coming from the isc_portset_create() function to the result variable. CID 356328: /bin/named/server.c: 8756 in load_configuration() 8750 "creating UDP/IPv4 port set: %s", 8751 isc_result_totext(result)); 8752 goto cleanup_bindkeys_parser; 8753 } 8754 isc_portset_create(named_g_mctx, &v6portset); 8755 if (result != ISC_R_SUCCESS) { >>> CID 356328: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "isc_log_write(named_g_lctx,...". 8756 isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, 8757 NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, 8758 "creating UDP/IPv6 port set: %s", 8759 isc_result_totext(result)); 8760 goto cleanup_v4portset; 8761 } --- 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 476c408b78..fd7426ac74 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -8764,7 +8764,7 @@ load_configuration(const char *filename, named_server_t *server, isc_result_totext(result)); goto cleanup_bindkeys_parser; } - isc_portset_create(named_g_mctx, &v6portset); + result = isc_portset_create(named_g_mctx, &v6portset); if (result != ISC_R_SUCCESS) { isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,