summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2018-06-14 14:55:10 +0000
committerflorian <florian@openbsd.org>2018-06-14 14:55:10 +0000
commitf0019ee5c03d5026cf69bb7e9f34b2d78f7e76dc (patch)
tree5e7902af46390225491b367d0768efa839dc28dd
parentIn soclose() and soaccept() convert the KASSERT(SS_NOFDREF) back (diff)
downloadwireguard-openbsd-f0019ee5c03d5026cf69bb7e9f34b2d78f7e76dc.tar.xz
wireguard-openbsd-f0019ee5c03d5026cf69bb7e9f34b2d78f7e76dc.zip
fix mem leak
from Thomas Barabosch (thomas.barabosch AT fkie fraunhofer de), thanks! OK tb
-rw-r--r--usr.sbin/route6d/route6d.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c
index ac7addd9721..597fe2d70e7 100644
--- a/usr.sbin/route6d/route6d.c
+++ b/usr.sbin/route6d/route6d.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route6d.c,v 1.93 2018/01/16 10:33:55 mpi Exp $ */
+/* $OpenBSD: route6d.c,v 1.94 2018/06/14 14:55:10 florian Exp $ */
/* $KAME: route6d.c,v 1.111 2006/10/25 06:38:13 jinmei Exp $ */
/*
@@ -567,6 +567,7 @@ init(void)
/*NOTREACHED*/
}
+ freeaddrinfo(res);
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_INET6;
hints.ai_socktype = SOCK_DGRAM;
@@ -580,6 +581,7 @@ init(void)
/*NOTREACHED*/
}
memcpy(&ripsin, res->ai_addr, res->ai_addrlen);
+ freeaddrinfo(res);
pfd[0].fd = ripsock;
pfd[0].events = POLLIN;