From d9daa4b827ce0585d39eb0ef034125f8b5dca574 Mon Sep 17 00:00:00 2001 From: bz Date: Tue, 9 Dec 2008 19:44:53 +0000 Subject: Fix a bug introduced in r185747: rather than dereferencing an uninitialized *rt to something undefined, use the fibnum that came in as function argument. Found with: Coverity Prevent(tm) CID: 4168 --- sys/net/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/net') diff --git a/sys/net/route.c b/sys/net/route.c index 565564a..365ec1e 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -513,7 +513,7 @@ rtredirect_fib(struct sockaddr *dst, struct rt_addrinfo info; struct ifaddr *ifa; struct radix_node_head *rnh = - V_rt_tables[rt->rt_fibnum][dst->sa_family]; + V_rt_tables[fibnum][dst->sa_family]; /* verify the gateway is directly reachable */ if ((ifa = ifa_ifwithnet(gateway)) == NULL) { -- cgit v1.1