Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2012 00:24:39 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r231324 - stable/9/sys/netinet6
Message-ID:  <201202100024.q1A0OdN1045172@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202100024.q1A0OdN1045172>