From owner-svn-src-all@FreeBSD.ORG Fri Feb 10 00:24:39 2012 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 B7D7A106566B; Fri, 10 Feb 2012 00:24:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A62AA8FC1A; Fri, 10 Feb 2012 00:24:39 +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 q1A0Odgl045174; Fri, 10 Feb 2012 00:24:39 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1A0OdN1045172; Fri, 10 Feb 2012 00:24:39 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201202100024.q1A0OdN1045172@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 10 Feb 2012 00:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231324 - stable/9/sys/netinet6 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: Fri, 10 Feb 2012 00:24:39 -0000 Author: bz Date: Fri Feb 10 00:24:39 2012 New Revision: 231324 URL: http://svn.freebsd.org/changeset/base/231324 Log: MFC r230506: Plug a possible ifa_ref leak in case of premature return from in6_purgeaddr(). Reviewed by: rwatson Modified: stable/9/sys/netinet6/in6.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Fri Feb 10 00:10:13 2012 (r231323) +++ stable/9/sys/netinet6/in6.c Fri Feb 10 00:24:39 2012 (r231324) @@ -1448,6 +1448,8 @@ in6_purgeaddr(struct ifaddr *ifa) } cleanup: + if (ifa0 != NULL) + ifa_free(ifa0); plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ if ((ia->ia_flags & IFA_ROUTE) && plen == 128) { @@ -1472,8 +1474,6 @@ cleanup: return; ia->ia_flags &= ~IFA_ROUTE; } - if (ifa0 != NULL) - ifa_free(ifa0); in6_unlink_ifa(ia, ifp); }