From owner-freebsd-net@FreeBSD.ORG Wed Sep 22 08:07:30 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3C1716A4CE for ; Wed, 22 Sep 2004 08:07:30 +0000 (GMT) Received: from burka.carrier.kiev.ua (burka.carrier.kiev.ua [193.193.193.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17F2843D2D for ; Wed, 22 Sep 2004 08:07:30 +0000 (GMT) (envelope-from netch@lucky.net) Received: from burka.carrier.kiev.ua (netch@localhost [127.0.0.1]) by burka.carrier.kiev.ua with ESMTP id i8M87NG2023449; Wed, 22 Sep 2004 11:07:24 +0300 (EEST) (envelope-from netch@burka.carrier.kiev.ua) Received: (from netch@localhost) by burka.carrier.kiev.ua (8.12.11/8.12.11/Submit) id i8M87MPg023446; Wed, 22 Sep 2004 11:07:22 +0300 (EEST) (envelope-from netch) Date: Wed, 22 Sep 2004 11:07:22 +0300 From: Valentin Nechayev To: "JINMEI Tatuya / ?$B?@L@C#:H" Message-ID: <20040922080722.GS89036@lucky.net> References: <20040921123016.GA41677@melusine.cuivre.fr.eu.org> <20040921190717.GG84228@lucky.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-42: On X-Verify-Sender: Address has been verified (burka.carrier.kiev.ua) cc: freebsd-net@freebsd.org Subject: Re: freeaddrinfo(NULL) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: netch@lucky.net List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 08:07:30 -0000 Wed, Sep 22, 2004 at 05:07:13, jinmei wrote about "Re: freeaddrinfo(NULL)": > I was not talking about things like whether NULL had been specially > designed or not. I was basically talking about any invalid argument > to freeaddrinfo. Well, garbage in pointer is unquestionably invalid, but whether NULL is invalid it's discussable (and flammable) question. Initing pointer to NULL is popular method and it's reasonable to keep it working without extra actions, as verifying !=NULL at freeing. As this discussion has no common with -net questions, I propose to move it to some another list. > However, since the API > specification is silent on this, I'd then request that the man page > make an explicit note that the application programmer should be check > if the argument to freeaddrinfo() is valid because passing a NULL > pointer may cause an unexpected result, including segfaulting, on > other systems. Agreed. -netch-