From 983985c11e1adf547ff3d068b50cf8a0802e017c Mon Sep 17 00:00:00 2001 From: Jeffrey Hsu Date: Sun, 13 Apr 2003 06:21:02 +0000 Subject: [PATCH] No need to unlock if error detected before locking. Submitted by: harti --- sys/net/route.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/net/route.c b/sys/net/route.c index 543151f77ef..4475756a957 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -544,8 +544,10 @@ rtrequest1(req, info, ret_nrt) /* * Find the correct routing tree to use for this Address Family */ - if ((rnh = rt_tables[dst->sa_family]) == 0) - senderr(EAFNOSUPPORT); + if ((rnh = rt_tables[dst->sa_family]) == 0) { + splx(s); + return (EAFNOSUPPORT); + } RADIX_NODE_HEAD_LOCK(rnh); /* * If we are adding a host route then we don't want to put