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);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to