From owner-freebsd-fs@FreeBSD.ORG Fri Jun 11 14:51:46 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B96091065678 for ; Fri, 11 Jun 2010 14:51:46 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 6A4F28FC13 for ; Fri, 11 Jun 2010 14:51:45 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAKvqEUyDaFvK/2dsb2JhbACee3G/EYUYBA X-IronPort-AV: E=Sophos;i="4.53,403,1272859200"; d="scan'208";a="80337382" Received: from fraser.cs.uoguelph.ca ([131.104.91.202]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 11 Jun 2010 10:51:43 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by fraser.cs.uoguelph.ca (Postfix) with ESMTP id 74E1A109C358; Fri, 11 Jun 2010 10:51:45 -0400 (EDT) X-Virus-Scanned: amavisd-new at fraser.cs.uoguelph.ca Received: from fraser.cs.uoguelph.ca ([127.0.0.1]) by localhost (fraser.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i6wLuQqUrRwm; Fri, 11 Jun 2010 10:51:45 -0400 (EDT) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by fraser.cs.uoguelph.ca (Postfix) with ESMTP id 101DE109C34B; Fri, 11 Jun 2010 10:51:45 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id o5BF7v320443; Fri, 11 Jun 2010 11:07:57 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Fri, 11 Jun 2010 11:07:57 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: Andrey Simonenko In-Reply-To: <20100611103803.GA1855@pm513-1.comsys.ntu-kpi.kiev.ua> Message-ID: References: <20100611103803.GA1855@pm513-1.comsys.ntu-kpi.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-fs@freebsd.org Subject: Re: Testers: NFSv3 support for pxeboot for nfs diskless root X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 14:51:46 -0000 On Fri, 11 Jun 2010, Andrey Simonenko wrote: > > Shouldn't return values from malloc() calls be checked? Yea, I suppose that's a good idea, although I think all that can be done is print a failure message, since it's "dead in the water" at that point. > Also additional checks for NULL values before free() calls can be removed, > at least this will reduce size of code. There is PR/83424 related to this. > My only concern here would be if someone were to change Free() so it doesn't check for a null pointer, but since it does now, I suppose it's a feature and shouldn't be changed. Anyone else have an opinion on this? (ie. Whether I should just assume that Free() checks for the NULL ptr.) rick