summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_options.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2010-10-14 12:32:49 +0000
committerbz <bz@FreeBSD.org>2010-10-14 12:32:49 +0000
commit1b336481b46c643815121ada70a82e641251576d (patch)
tree31ea6a12afe5599b5894e1f4ee7b0889f9ac8e21 /sys/netinet/ip_options.c
parent933085e458ab59fe6a2121531419df46590870b6 (diff)
downloadFreeBSD-src-1b336481b46c643815121ada70a82e641251576d.zip
FreeBSD-src-1b336481b46c643815121ada70a82e641251576d.tar.gz
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
Diffstat (limited to 'sys/netinet/ip_options.c')
-rw-r--r--sys/netinet/ip_options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_options.c b/sys/netinet/ip_options.c
index a7afbfd..53ba713 100644
--- a/sys/netinet/ip_options.c
+++ b/sys/netinet/ip_options.c
@@ -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);
OpenPOWER on IntegriCloud