Skip to content

Commit

Permalink
Dont leak the rnh lock on error.
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsa committed Dec 13, 2008
1 parent 79df8e4 commit deedb2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sys/net/rtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit deedb2b

Please sign in to comment.