Date: Tue, 16 Mar 2010 01:06:18 +0900 From: Hajimu UMEMOTO <ume@freebsd.org> To: Earl Lapus <earl.lapus@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: [ping6] freeaddrinfo() Message-ID: <ygeeijlzi11.wl%ume@mahoroba.org> In-Reply-To: <604f76121003130425u62764f59wa88b398f15540b61@mail.gmail.com> References: <604f76121003130425u62764f59wa88b398f15540b61@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, >>>>> On Sat, 13 Mar 2010 20:25:29 +0800 >>>>> Earl Lapus <earl.lapus@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@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygeeijlzi11.wl%ume>