Skip to content

Resolve "CID 356328: Control flow issues (DEADCODE) in bin/named/server.c"

Arаm Sаrgsyаn requested to merge 3514-cid-356328-deadcode-in-server.c into main

There is an omission of assigning the result value coming from the isc_portset_create() function.

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     	}

Closes #3514 (closed)

Merge request reports