Dont leak the rnh lock on error.

This commit is contained in:
thompsa 2008-12-13 22:41:36 +00:00
parent 79df8e4599
commit deedb2bd3a

View File

@ -673,10 +673,10 @@ route_output(struct mbuf *m, struct socket *so)
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 &&