From owner-svn-src-all@FreeBSD.ORG Thu Jun 2 10:21:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07BEC1065672; Thu, 2 Jun 2011 10:21:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECC658FC08; Thu, 2 Jun 2011 10:21:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p52AL5vt011711; Thu, 2 Jun 2011 10:21:05 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p52AL5bM011709; Thu, 2 Jun 2011 10:21:05 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201106021021.p52AL5bM011709@svn.freebsd.org> From: Robert Watson Date: Thu, 2 Jun 2011 10:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222602 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2011 10:21:06 -0000 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)