summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-10-02 17:53:26 +0930
committerRusty Russell <rusty@rustcorp.com.au>2013-10-02 17:53:26 +0930
commit3e9d2361ced4537fd04717f49e153df628ec61bb (patch)
treed03363c263462faae4401bf23b9d33650ddc3f90
parent4f09cf20ca00fe38b0702e0556bbad2341595ed0 (diff)
net: fix leak in test.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--ccan/net/test/run-bind.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ccan/net/test/run-bind.c b/ccan/net/test/run-bind.c
index 9fb2081d..14b38853 100644
--- a/ccan/net/test/run-bind.c
+++ b/ccan/net/test/run-bind.c
@@ -117,6 +117,7 @@ int main(void)
close(fd);
for (i = 0; i < num_fds; i++)
close(fds[i]);
+ freeaddrinfo(addr);
/* Simple UDP test. */
addr = net_server_lookup(TEST_PORT, AF_UNSPEC, SOCK_DGRAM);
@@ -155,6 +156,7 @@ int main(void)
if (addr->ai_next)
ipv6_only = true;
#endif
+ freeaddrinfo(addr);
if (ipv6_only) {
int j;