diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-09-16 06:58:09 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-09-16 06:58:09 +0000 |
commit | aa40d9fcd10b40f4d3343448eb892a58b93e6353 (patch) | |
tree | e43ce7a0196c1ac037b7dc2f96685bc0cf698792 | |
parent | 72206335df44e387ed2b6f1a3f5dbc56ce0e5730 (diff) |
Fix uninitalized use of variable.
Issue _17 found by Maxime Villard Brainy scanner.
OK bluhm@
-rw-r--r-- | sys/netinet/if_ether.c | 5 |
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, |