From: Mark Andrews Date: Wed, 5 Feb 2020 04:41:26 +0000 (+1100) Subject: 'buffer' must be non-NULL as isc_buffer_allocate can no longer fail. X-Git-Tag: v9.16.0~29^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a038f77d92a857bc11750683c9317d70da6fcfdf;p=thirdparty%2Fbind9.git '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); --- diff --git a/lib/dns/catz.c b/lib/dns/catz.c index 8c3b9fde697..e175badff2c 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); }