From a038f77d92a857bc11750683c9317d70da6fcfdf Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 5 Feb 2020 15:41:26 +1100 Subject: [PATCH] 'buffer' must be non-NULL as isc_buffer_allocate can no longer fail. 1636 cleanup: CID 1458130 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking buffer suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 1637 if (buffer != NULL) 1638 isc_buffer_free(&buffer); --- lib/dns/catz.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/dns/catz.c b/lib/dns/catz.c index 8c3b9fde69..e175badff2 100644 --- a/lib/dns/catz.c +++ b/lib/dns/catz.c @@ -1655,9 +1655,7 @@ dns_catz_generate_zonecfg(dns_catz_zone_t *zone, dns_catz_entry_t *entry, return (ISC_R_SUCCESS); cleanup: - if (buffer != NULL) { - isc_buffer_free(&buffer); - } + isc_buffer_free(&buffer); return (result); }