Date: Fri, 11 Jun 2010 11:51:21 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-fs@freebsd.org Subject: Re: Testers: NFSv3 support for pxeboot for nfs diskless root Message-ID: <201006111151.21925.jhb@freebsd.org> In-Reply-To: <Pine.GSO.4.63.1006111104400.20439@muncher.cs.uoguelph.ca> References: <Pine.GSO.4.63.1006091934390.22971@muncher.cs.uoguelph.ca> <20100611103803.GA1855@pm513-1.comsys.ntu-kpi.kiev.ua> <Pine.GSO.4.63.1006111104400.20439@muncher.cs.uoguelph.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 11 June 2010 11:07:57 am Rick Macklem wrote: > > 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.) free() in the kernel and userland also check for NULL, so I think it's ok to assume the same behavior for libstand. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006111151.21925.jhb>