From owner-svn-src-head@FreeBSD.ORG Thu Oct 14 12:32:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1206A106564A; Thu, 14 Oct 2010 12:32:50 +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 00B7C8FC17; Thu, 14 Oct 2010 12:32:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9ECWn5l024353; Thu, 14 Oct 2010 12:32:49 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9ECWnsv024351; Thu, 14 Oct 2010 12:32:49 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201010141232.o9ECWnsv024351@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 14 Oct 2010 12:32:49 +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: r213832 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Oct 2010 12:32:50 -0000 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);