svn commit: r186061 - head/sys/net

Andrew Thompson thompsa at FreeBSD.org
Sat Dec 13 22:41:37 UTC 2008


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 &&


More information about the svn-src-all mailing list