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

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);
This commit is contained in:
Mark Andrews
2021-02-22 09:28:37 +11:00
parent 3e9fba94e3
commit 658c950d7b

View File

@@ -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);