Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Dec 2008 22:41:36 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186061 - head/sys/net
Message-ID:  <200812132241.mBDMfafi041792@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thompsa
Date: Sat Dec 13 22:41:36 2008
New Revision: 186061
URL: http://svn.freebsd.org/changeset/base/186061

Log:
  Dont leak the rnh lock on error.

Modified:
  head/sys/net/rtsock.c

Modified: head/sys/net/rtsock.c
==============================================================================
--- head/sys/net/rtsock.c	Sat Dec 13 22:26:24 2008	(r186060)
+++ head/sys/net/rtsock.c	Sat Dec 13 22:41:36 2008	(r186061)
@@ -673,10 +673,10 @@ route_output(struct mbuf *m, struct sock
 				       rt->rt_ifa->ifa_addr))) {
 				RT_UNLOCK(rt);
 				RADIX_NODE_HEAD_LOCK(rnh);
-				if ((error = rt_getifa_fib(&info,
-				    rt->rt_fibnum)) != 0)
-					senderr(error);
+				error = rt_getifa_fib(&info, rt->rt_fibnum);
 				RADIX_NODE_HEAD_UNLOCK(rnh);
+				if (error != 0)
+					senderr(error);
 				RT_LOCK(rt);
 			}
 			if (info.rti_ifa != NULL &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812132241.mBDMfafi041792>