Skip to content

Commit

Permalink
connected/test: fix memleak in test.
Browse files Browse the repository at this point in the history
```
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all connectd/test/run-netaddress > /dev/null
==2483395== 16 bytes in 1 blocks are still reachable in loss record 1 of 15
==2483395==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2483395==    by 0x10D59A: autodata_register_ (autodata.c:20)
==2483395==    by 0x10EB26: register_autotype_type_to_string (type_to_string.h:77)
==2483395==    by 0x10EB6B: register_one_type_to_string0 (type_to_string.c:8)
==2483395==    by 0x188C0C: __libc_csu_init (in /home/rusty/devel/cvs/lightning/connectd/test/run-netaddress)
==2483395==    by 0x4A3A00F: (below main) (libc-start.c:264)
==2483395==
==2483395== 40 bytes in 1 blocks are still reachable in loss record 2 of 15
==2483395==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
...
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Jun 29, 2022
1 parent fd90e57 commit 9ab7c8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions connectd/test/run-netaddress.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,6 @@ int main(int argc, char *argv[])
assert(!IsValid(&wa));
assert(!IsIPv4(&wa));
assert(IsIPv6(&wa));

common_shutdown();
}

0 comments on commit 9ab7c8a

Please sign in to comment.