Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2010 11:07:57 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Testers: NFSv3 support for pxeboot for nfs diskless root
Message-ID:  <Pine.GSO.4.63.1006111104400.20439@muncher.cs.uoguelph.ca>
In-Reply-To: <20100611103803.GA1855@pm513-1.comsys.ntu-kpi.kiev.ua>
References:  <Pine.GSO.4.63.1006091934390.22971@muncher.cs.uoguelph.ca> <20100611103803.GA1855@pm513-1.comsys.ntu-kpi.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.63.1006111104400.20439>