[ping6] freeaddrinfo()
Hajimu UMEMOTO
ume at freebsd.org
Mon Mar 15 16:06:28 UTC 2010
Hi,
>>>>> On Sat, 13 Mar 2010 20:25:29 +0800
>>>>> Earl Lapus <earl.lapus at gmail.com> said:
earl> I was browsing through the ping6 code and I noticed that one
earl> particular call to getaddrinfo() didn't have a freeaddrinfo() pair.
earl> All calls to getaddrinfo() should have an equivalent freeaddrinfo(), right?
Yup, it should be good practice. But, this is rather intentional.
The `hostname' variable points to res->ai_canonname, and is used
later. This is why the `res' variable is declared globally.
Sincerely,
--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume at mahoroba.org ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
More information about the freebsd-net
mailing list