svn commit: r213947 - stable/8/sys/netinet

Bjoern A. Zeeb bz at FreeBSD.org
Sun Oct 17 08:46:34 UTC 2010


Author: bz
Date: Sun Oct 17 08:46:34 2010
New Revision: 213947
URL: http://svn.freebsd.org/changeset/base/213947

Log:
  MFC r213832:
  
    Use ifa_ifwithaddr_check() rather than ifa_ifwithaddr() as we are not
    interested in the result and would leak a reference otherwise.
  
  PR:		kern/151435
  Submitted by:	Andrew Boyer (aboyer averesystems.com)

Modified:
  stable/8/sys/netinet/ip_options.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/netinet/ip_options.c
==============================================================================
--- stable/8/sys/netinet/ip_options.c	Sun Oct 17 08:44:34 2010	(r213946)
+++ stable/8/sys/netinet/ip_options.c	Sun Oct 17 08:46:34 2010	(r213947)
@@ -343,7 +343,7 @@ dropit:
 				}
 				(void)memcpy(&ipaddr.sin_addr, sin,
 				    sizeof(struct in_addr));
-				if (ifa_ifwithaddr((SA)&ipaddr) == NULL)
+				if (ifa_ifwithaddr_check((SA)&ipaddr) == 0)
 					continue;
 				cp[IPOPT_OFFSET] += sizeof(struct in_addr);
 				off += sizeof(struct in_addr);


More information about the svn-src-all mailing list