svn commit: r213832 - head/sys/netinet

Bjoern A. Zeeb bz at FreeBSD.org
Thu Oct 14 12:32:50 UTC 2010


Author: bz
Date: Thu Oct 14 12:32:49 2010
New Revision: 213832
URL: http://svn.freebsd.org/changeset/base/213832

Log:
  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)
  MFC after:	3 days

Modified:
  head/sys/netinet/ip_options.c

Modified: head/sys/netinet/ip_options.c
==============================================================================
--- head/sys/netinet/ip_options.c	Thu Oct 14 11:20:23 2010	(r213831)
+++ head/sys/netinet/ip_options.c	Thu Oct 14 12:32:49 2010	(r213832)
@@ -341,7 +341,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-head mailing list