Subject: Re: NULL after *_free?

Re: NULL after *_free?

From: Peter Stuge <peter_at_stuge.se>
Date: Thu, 11 Feb 2010 22:01:20 +0100

Neil Gierman wrote:
> in my code is I have a FREE macro that checks if a pointer is NULL
> and if not, free()'s it.
..
> Should we set pointers to NULL after free()'ing them, or is that
> the responsibility of the application?

That's in the app. Your macro, you have to make sure it's suitable.

I'm not strongly opposed to it but I do think the library should be
as thin as possible, so I do prefer not to add it.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-02-11