From 658c950d7b96e9af2d6edce68d8944fd257af114 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 22 Feb 2021 09:28:37 +1100 Subject: [PATCH] Silence CID 320481: Null pointer dereferences *** CID 320481: Null pointer dereferences (REVERSE_INULL) /bin/tests/wire_test.c: 261 in main() 255 process_message(input); 256 } 257 } else { 258 process_message(input); 259 } 260 CID 320481: Null pointer dereferences (REVERSE_INULL) Null-checking "input" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 261 if (input != NULL) { 262 isc_buffer_free(&input); 263 } 264 265 if (printmemstats) { 266 isc_mem_stats(mctx, stdout); --- bin/tests/wire_test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/tests/wire_test.c b/bin/tests/wire_test.c index 107f2cc7a1..ef86a1e7c5 100644 --- a/bin/tests/wire_test.c +++ b/bin/tests/wire_test.c @@ -258,9 +258,7 @@ main(int argc, char *argv[]) { process_message(input); } - if (input != NULL) { - isc_buffer_free(&input); - } + isc_buffer_free(&input); if (printmemstats) { isc_mem_stats(mctx, stdout);