summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2015-09-16 06:58:08 +0000
committerclaudio <claudio@openbsd.org>2015-09-16 06:58:08 +0000
commit850df288fa1033e90e6f856d912a5982f7707c1f (patch)
tree404d2a825b1e219243e8079d0f7f38bb41b682b7
parentRepair. (diff)
downloadwireguard-openbsd-850df288fa1033e90e6f856d912a5982f7707c1f.tar.xz
wireguard-openbsd-850df288fa1033e90e6f856d912a5982f7707c1f.zip
Fix uninitalized use of variable.
Issue _17 found by Maxime Villard Brainy scanner. OK bluhm@
-rw-r--r--sys/netinet/if_ether.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index c59fd2aed47..cca016dbb90 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.168 2015/09/13 17:53:44 mpi Exp $ */
+/* $OpenBSD: if_ether.c,v 1.169 2015/09/16 06:58:08 claudio Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -367,10 +367,11 @@ arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
"local address\n", __func__, inet_ntop(AF_INET,
&satosin(dst)->sin_addr, addr, sizeof(addr)));
} else {
+ la = NULL;
if ((rt = arplookup(satosin(dst)->sin_addr.s_addr, 1, 0,
ifp->if_rdomain)) != NULL)
la = ((struct llinfo_arp *)rt->rt_llinfo);
- else
+ if (la == NULL)
log(LOG_DEBUG, "%s: %s: can't allocate llinfo\n",
__func__,
inet_ntop(AF_INET, &satosin(dst)->sin_addr,