summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaxim <maxim@FreeBSD.org>2002-07-29 09:01:39 +0000
committermaxim <maxim@FreeBSD.org>2002-07-29 09:01:39 +0000
commit3a86ff2aeb2a498c6d51422bae381540233c6946 (patch)
tree838e5b902ead4954ce4a84b5c1c39b8e98eec711
parent2a8927efce725d1d177ca030f8748dd047f9a198 (diff)
downloadFreeBSD-src-3a86ff2aeb2a498c6d51422bae381540233c6946.zip
FreeBSD-src-3a86ff2aeb2a498c6d51422bae381540233c6946.tar.gz
Use a common way to release locks before exit.
Reviewed by: hsu
-rw-r--r--sys/netinet/tcp_usrreq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 9dc5663..86720d0 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -407,8 +407,10 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
if (IN6_IS_ADDR_V4MAPPED(&sin6p->sin6_addr)) {
struct sockaddr_in sin;
- if ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0)
- return(EINVAL);
+ if ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0) {
+ error = EINVAL;
+ goto out;
+ }
in6_sin6_2_sin(&sin, sin6p);
inp->inp_vflag |= INP_IPV4;
OpenPOWER on IntegriCloud