Fix bugs reported by clang-static-analyzers
We have some supposed bugs reported by clang-static-analyzer.
You can check the current status at https://jenkins.aws.isc.org/job/kea-dev/job/jenkins-tests-report/Jenkins_20Tests_20Report/ on the clang-static-analyzer/index
tab.
Here are the ones that are reported on Kea code from https://jenkins.aws.isc.org/job/kea-dev/job/clang-static-analyzer/21/.
Bug Group | Bug Type ▾ | File | Function/Method | Line | Path Length |
---|---|---|---|---|---|
API | Argument with 'nonnull' attribute passed null | home/fedora/workspace/kea-dev/clang-static-analyzer/src/lib/dns/nsec3hash.cc | NSEC3HashRFC5155 | 77 | 11 |
Unused code | Dead assignment | home/fedora/workspace/kea-dev/clang-static-analyzer/src/lib/dhcpsrv/iterative_allocator.cc | pickPrefixInternal | 319 | 1 |
Unused code | Dead assignment | home/fedora/workspace/kea-dev/clang-static-analyzer/src/hooks/dhcp/high_availability/libloadtests/close_unittests.cc | runPartners | 310 | 1 |
Unused code | Dead assignment | home/fedora/workspace/kea-dev/clang-static-analyzer/src/hooks/dhcp/high_availability/libloadtests/close_unittests.cc | runPartners | 306 | 1 |
Unused code | Dead assignment | home/fedora/workspace/kea-dev/clang-static-analyzer/src/lib/dhcp/tests/libdhcp++_unittest.cc | TestBody | 1804 | 1 |
Unused code | Dead assignment | home/fedora/workspace/kea-dev/clang-static-analyzer/src/lib/dhcpsrv/iterative_allocator.cc | pickAddressInternal | 175 | 1 |
Unused code | Dead assignment | home/fedora/workspace/kea-dev/clang-static-analyzer/premium/src/hooks/dhcp/radius/radius_accounting.cc | getCreateTimestamp | 823 | 1 |
Unused code | Dead increment | home/fedora/workspace/kea-dev/clang-static-analyzer/src/lib/tcp/tcp_stream_msg.cc | postBuffer | 41 | 1 |
Logic error | Dereference of null pointer | home/fedora/workspace/kea-dev/clang-static-analyzer/premium/src/hooks/dhcp/radius/tests/attribute_unittests.cc | TestBody | 334 | 7 |
Logic error | Dereference of null pointer | home/fedora/workspace/kea-dev/clang-static-analyzer/premium/src/hooks/dhcp/radius/tests/attribute_unittests.cc | TestBody | 260 | 7 |
Logic error | Dereference of null pointer | home/fedora/workspace/kea-dev/clang-static-analyzer/premium/src/hooks/dhcp/radius/tests/attribute_unittests.cc | TestBody | 136 | 10 |
Logic error | Dereference of null pointer | home/fedora/workspace/kea-dev/clang-static-analyzer/premium/src/hooks/dhcp/radius/tests/attribute_unittests.cc | TestBody | 783 | 16 |
Logic error | Dereference of null pointer | home/fedora/workspace/kea-dev/clang-static-analyzer/premium/src/hooks/dhcp/radius/tests/attribute_unittests.cc | TestBody | 165 | 10 |
Logic error | Dereference of null pointer | home/fedora/workspace/kea-dev/clang-static-analyzer/premium/src/hooks/dhcp/radius/tests/attribute_unittests.cc | TestBody | 230 | 7 |
Logic error | Dereference of null pointer | home/fedora/workspace/kea-dev/clang-static-analyzer/premium/src/hooks/dhcp/radius/tests/attribute_unittests.cc | TestBody | 983 | 16 |
Logic error | Dereference of null pointer | home/fedora/workspace/kea-dev/clang-static-analyzer/premium/src/hooks/dhcp/radius/tests/attribute_unittests.cc | TestBody | 199 | 10 |
Logic error | Garbage return value | home/fedora/workspace/kea-dev/clang-static-analyzer/src/lib/config_backend/tests/config_backend_mgr_unittest.cc | getProperty | 254 | 7 |
Memory error | Memory leak | home/fedora/workspace/kea-dev/clang-static-analyzer/src/lib/dhcp/option_space.cc | validateName | 45 | 11 |
Memory error | Memory leak | home/fedora/workspace/kea-dev/clang-static-analyzer/src/lib/util/io/socketsession.cc | SocketSessionForwarder | 112 | 16 |
Memory error | Memory leak | home/fedora/workspace/kea-dev/clang-static-analyzer/src/lib/dhcp/option_space.cc | validateName | 45 | 11 |