From owner-svn-src-all@FreeBSD.ORG Tue Jan 24 13:57:30 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 C7BF91065670; Tue, 24 Jan 2012 13:57:30 +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 B6EE48FC14; Tue, 24 Jan 2012 13:57:30 +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 q0ODvUZE078116; Tue, 24 Jan 2012 13:57:30 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0ODvUfa078114; Tue, 24 Jan 2012 13:57:30 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201201241357.q0ODvUfa078114@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 24 Jan 2012 13:57:30 +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: r230506 - head/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: Tue, 24 Jan 2012 13:57:30 -0000 Author: bz Date: Tue Jan 24 13:57:30 2012 New Revision: 230506 URL: http://svn.freebsd.org/changeset/base/230506 Log: Plug a possible ifa_ref leak in case of premature return from in6_purgeaddr(). Reviewed by: rwatson MFC after: 3 days Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Tue Jan 24 13:23:52 2012 (r230505) +++ head/sys/netinet6/in6.c Tue Jan 24 13:57:30 2012 (r230506) @@ -1477,6 +1477,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) { @@ -1501,8 +1503,6 @@ cleanup: return; ia->ia_flags &= ~IFA_ROUTE; } - if (ifa0 != NULL) - ifa_free(ifa0); in6_unlink_ifa(ia, ifp); }