From owner-freebsd-net@FreeBSD.ORG Mon Mar 15 16:06:28 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B8881065678 for ; Mon, 15 Mar 2010 16:06:28 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from mail.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) by mx1.freebsd.org (Postfix) with ESMTP id E6BE18FC1E for ; Mon, 15 Mar 2010 16:06:27 +0000 (UTC) Received: from yuga.mahoroba.org (ume@yuga.mahoroba.org [IPv6:2001:2f0:104:8010:21b:d3ff:fe38:5381]) (user=ume mech=DIGEST-MD5 bits=0) by mail.mahoroba.org (8.14.4/8.14.4) with ESMTP/inet6 id o2FG6K5W028199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Mar 2010 01:06:20 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Tue, 16 Mar 2010 01:06:18 +0900 Message-ID: From: Hajimu UMEMOTO To: Earl Lapus In-Reply-To: <604f76121003130425u62764f59wa88b398f15540b61@mail.gmail.com> References: <604f76121003130425u62764f59wa88b398f15540b61@mail.gmail.com> User-Agent: xcite1.58> Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.7 Emacs/23.1 (i386-portbld-freebsd8.0) MULE/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 8.0-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (mail.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Tue, 16 Mar 2010 01:06:20 +0900 (JST) X-Virus-Scanned: clamav-milter 0.95.3 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on asuka.mahoroba.org Cc: freebsd-net@freebsd.org Subject: Re: [ping6] freeaddrinfo() X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 16:06:28 -0000 Hi, >>>>> On Sat, 13 Mar 2010 20:25:29 +0800 >>>>> Earl Lapus 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/