diff options
author | bz <bz@FreeBSD.org> | 2008-12-09 19:44:53 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-12-09 19:44:53 +0000 |
commit | d9daa4b827ce0585d39eb0ef034125f8b5dca574 (patch) | |
tree | fd2d77e841a43683555cbf922e7af9f515ea59b8 /sys/net/route.c | |
parent | 13d2c49a2f73e459dbd0573ffcd6009487f155e9 (diff) | |
download | FreeBSD-src-d9daa4b827ce0585d39eb0ef034125f8b5dca574.zip FreeBSD-src-d9daa4b827ce0585d39eb0ef034125f8b5dca574.tar.gz |
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
Diffstat (limited to 'sys/net/route.c')
-rw-r--r-- | sys/net/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |