svn commit: r222602 - head/sys/netinet

Robert Watson rwatson at FreeBSD.org
Thu Jun 2 10:21:06 UTC 2011


Author: rwatson
Date: Thu Jun  2 10:21:05 2011
New Revision: 222602
URL: http://svn.freebsd.org/changeset/base/222602

Log:
  Do not leak the pcbinfohash lock in the case where in6_pcbladdr() returns
  an error during TCP connect(2) on an IPv6 socket.
  
  Submitted by:	bz
  Sponsored by:	Juniper Networks, Inc.

Modified:
  head/sys/netinet/tcp_usrreq.c

Modified: head/sys/netinet/tcp_usrreq.c
==============================================================================
--- head/sys/netinet/tcp_usrreq.c	Thu Jun  2 10:18:49 2011	(r222601)
+++ head/sys/netinet/tcp_usrreq.c	Thu Jun  2 10:21:05 2011	(r222602)
@@ -1158,7 +1158,7 @@ tcp6_connect(struct tcpcb *tp, struct so
 	 */
 	error = in6_pcbladdr(inp, nam, &addr6);
 	if (error)
-		return error;
+		goto out;
 	oinp = in6_pcblookup_hash_locked(inp->inp_pcbinfo,
 				  &sin6->sin6_addr, sin6->sin6_port,
 				  IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)


More information about the svn-src-head mailing list