Mail Archives: djgpp/1992/10/27/14:22:14
|Assuming that free can handle NULL is invalid, unless you are sure
|that it's *supposed* to be ANSI compliant. Trying to free NULL also
|implies that your program isn't checking the validity of pointers it
|is dealing with.
ANSI is pretty clear about what free should do on a null pointer.
Sec. 4.10.3.2 pg. 155/36
... If ptr is a null pointer, no action occurs. ...
I'de classify this as a bug in the library. My guess is that berkeley
has fixed this for 4.4 BSD since they have put a lot of effort into
standards conformance..
TJ Merritt
tjm AT netcom DOT com
- Raw text -