Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Oct 2010 12:32:49 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r213832 - head/sys/netinet
Message-ID:  <201010141232.o9ECWnsv024351@svn.freebsd.org>

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



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