From owner-svn-src-head@FreeBSD.ORG Tue Dec 9 19:44:54 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24D5C1065672; Tue, 9 Dec 2008 19:44:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 151FD8FC18; Tue, 9 Dec 2008 19:44:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9Jir1l099893; Tue, 9 Dec 2008 19:44:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9JirJ6099892; Tue, 9 Dec 2008 19:44:53 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812091944.mB9JirJ6099892@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 9 Dec 2008 19:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185807 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 19:44:54 -0000 Author: bz Date: Tue Dec 9 19:44:53 2008 New Revision: 185807 URL: http://svn.freebsd.org/changeset/base/185807 Log: 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 Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Tue Dec 9 19:36:50 2008 (r185806) +++ head/sys/net/route.c Tue Dec 9 19:44:53 2008 (r185807) @@ -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) {