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.

Alex


On Wed, Aug 12, 2009 at 1:30 PM, Akim Demaille <[email protected]> wrote:

>
> Le 27 juil. 09 à 18:39, Joel E. Denny a écrit :
>
>  The `if' is redundant.  free (NULL) does nothing.
>>
>
> Not so true in C.  This is correct with delete in C++.
>
> Unless we have some replacement free() from gnulib which ensures this?




-- 
Best regards,
Alex Rozenman ([email protected]).

Reply via email to