diff options
author | hsu <hsu@FreeBSD.org> | 2003-04-13 06:21:02 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 2003-04-13 06:21:02 +0000 |
commit | 82569e4294c7d646e68b4ba7b831f78664dd7e35 (patch) | |
tree | 180f6815465216e5b56246d6792899b0cef7f993 | |
parent | 171e2e781e808154dd25f6a560b293f3a4780a7d (diff) | |
download | FreeBSD-src-82569e4294c7d646e68b4ba7b831f78664dd7e35.zip FreeBSD-src-82569e4294c7d646e68b4ba7b831f78664dd7e35.tar.gz |
No need to unlock if error detected before locking.
Submitted by: harti
-rw-r--r-- | sys/net/route.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index 543151f..4475756 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 |