2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

'dispatch' must be non NULL, remove test.

10067 cleanup:

	CID 1452683 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking dispatch suggests that it
	may be null, but it has already been dereferenced on all
	paths leading to the check.

10068        if (dispatch != NULL)
10069                isc_mem_put(server->mctx, dispatch, sizeof(*dispatch));
This commit is contained in:
Mark Andrews
2020-02-05 16:53:43 +11:00
parent fccf65a585
commit 891f24fa57

View File

@@ -10065,8 +10065,7 @@ named_add_reserved_dispatch(named_server_t *server,
return;
cleanup:
if (dispatch != NULL)
isc_mem_put(server->mctx, dispatch, sizeof(*dispatch));
isc_mem_put(server->mctx, dispatch, sizeof(*dispatch));
isc_sockaddr_format(addr, addrbuf, sizeof(addrbuf));
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,