From 0003beba9e251d0f6a7f53a6754fa000016d0822 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 22 Apr 2015 04:12:22 +0000 Subject: [PATCH] Init rt to NULL in arpresolve(). Not a problem in practice as la will be NULL when rt is uninitialised which should cause the function to return, but makes the code easier to follow. ok mpi@ miod@ --- sys/netinet/if_ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 43a88e8843e..b7e582e009a 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.150 2015/04/10 13:58:20 dlg Exp $ */ +/* $OpenBSD: if_ether.c,v 1.151 2015/04/22 04:12:22 jsg Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -357,7 +357,7 @@ arpresolve(struct arpcom *ac, struct rtentry *rt0, struct mbuf *m, { struct llinfo_arp *la; struct sockaddr_dl *sdl; - struct rtentry *rt; + struct rtentry *rt = NULL; struct mbuf *mh; char addr[INET_ADDRSTRLEN]; int error; -- 2.20.1