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
This commit is contained in:
parent
d48088aab1
commit
dc699bac75
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213832
@ -341,7 +341,7 @@ ip_dooptions(struct mbuf *m, int pass)
|
||||
}
|
||||
(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);
|
||||
|
Loading…
Reference in New Issue
Block a user