summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2015-09-10 17:35:46 +0000
committerdlg <dlg@openbsd.org>2015-09-10 17:35:46 +0000
commit3b82491efe5522e06a8b4e34e039b3e66679805b (patch)
treea0307482a9ab7e4ebfe77cec03e5adc877e957e3
parentif_put after if_get (diff)
downloadwireguard-openbsd-3b82491efe5522e06a8b4e34e039b3e66679805b.tar.xz
wireguard-openbsd-3b82491efe5522e06a8b4e34e039b3e66679805b.zip
if_put after if_get
easy now that mpi@ has removed the ifunit confusion. ok mpi@ claudio@
-rw-r--r--sys/net/route.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 77d901118dd..19b9b63a817 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.232 2015/09/10 14:46:28 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.233 2015/09/10 17:35:46 dlg Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -684,6 +684,7 @@ ifa_ifwithroute(int flags, struct sockaddr *dst, struct sockaddr *gateway,
if (ifp != NULL)
ifa = ifaof_ifpforaddr(dst, ifp);
+ if_put(ifp);
} else {
ifa = ifa_ifwithnet(gateway, rtableid);
}
@@ -761,6 +762,8 @@ rt_getifa(struct rt_addrinfo *info, u_int rtid)
sa, sa, rtid);
}
+ if_put(ifp);
+
if (info->rti_ifa == NULL)
return (ENETUNREACH);