Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
connectd: fix valgrind complaint on FreeBSD
As reported by Wladimir J. van der Laan. Valgrind will complain about padding and unset fields, so memset the structs. ``` ==42653== Syscall param socketcall.connect(serv_addr..sa_len) points to uninitialised byte(s) ==42653== at 0x4C7D19A: _connect (in /lib/libc.so.7) ==42653== by 0x4EE1F35: ??? (in /lib/libthr.so.3) ==42653== by 0x249D57: get_local_sockname (netaddress.c:212) ==42653== by 0x249CDB: guess_address (netaddress.c:242) ==42653== by 0x2473D0: public_address (connectd.c:1003) ==42653== by 0x246CE4: setup_listeners (connectd.c:0) ==42653== by 0x246566: connect_init (connectd.c:1311) ==42653== by 0x270CEB: next_plan (io.c:59) ==42653== by 0x2713EE: io_ready (io.c:417) ==42653== by 0x2726B1: io_loop (poll.c:445) ==42653== by 0x24618A: main (connectd.c:1703) ==42653== Address 0x7fc000690 is on thread 1's stack ==42653== in frame #3, created by guess_address (netaddress.c:231) ``` Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information