This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [rfc] asprintf() -> xasprintf()



fche@redhat.com said:
> Fernando Nasser <fnasser@cygnus.com> writes:
> : Good catch.  No more memory would cause an attempt to free NULL. :
> (Have you ever considered a FREE macro that tests for NULL pointers?
> [...]

> free(NULL) is defined in even old standards to be a no-op. 

Then somebody had better tell sunos that: I don't think it was listening 
:-)

R.

free(NULL) is not defined on older machines -- it came in with ANSI.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]