Hi Akim. On Wed, 12 Aug 2009, Akim Demaille wrote:
> Le 12 août 09 à 12:41, Alex Rozenman a écrit : > > > Hi Akim, > > > > Very short survey: > > In "single unix spec ver 2": > > > > > The *free()* function causes the space pointed to by *ptr* to be > > > deallocated; that is, made available for further allocation. If *ptr* is a > > > null pointer, no action occurs. > > > > I am not sure about Mac OS, for example. > > I would prefer to check, just to be of safe side. > > I'm biased by portability issues. Don't expect this to work. See free() on > this page. > > http://www.gnu.org/software/gnulib/MODULES.html That module is labeled obsolete, and gnulib.git/doc/posix-functions/free.texi says: On old platforms such as SunOS4, @code{free (NULL)} fails. However, since all such systems are so old as to no longer be considered ``reasonable portability targets,'' this module is no longer useful. Also, gnulib.git/build-aux/useless-if-before-free actually tries to combat the extra `if'.
