CLEANUP: protocol: intitialize all of the sockaddr when disconnecting
authorWilly Tarreau <w@1wt.eu>
Wed, 14 Oct 2020 08:50:41 +0000 (10:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 14 Oct 2020 08:54:15 +0000 (10:54 +0200)
commit2f6f362756124d13ec68680c2e6226ba75d926da
tree73aea450c65888b3aeb8dd8ddf1d1f1f98222b2c
parent2e065cbbf64a31ed7704c9a37e280b36a031f216
CLEANUP: protocol: intitialize all of the sockaddr when disconnecting

In issue #894, Coverity suspects uninitialized values for a socket's
address whose family is AF_UNSPEC but it doesn't know that the address
is not used in this case. It's not on a critical path and working around
it is trivial, let's fully declare the address. We're doing it for both
TCP and UDP, because the same principle appears at two places.
src/proto_tcp.c
src/proto_udp.c