effect of free()

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Sep 7 21:41:18 AEST 1989


In article <246 at ssp1.idca.tds.philips.nl> dolf at idca.tds.PHILIPS.nl (Dolf Grunbauer) writes:
-I agree with Dick, as the original statement is:
-   if (ptr == 0) ...
-I think Martin explained why the statement:
-   if (*ptr == 0) ...
-is unacceptable and how the OS could trigger this illegal use.
-Is this true or am I missing Martin's point ?

No, Martin tried to explain why if(ptr==0) could fail after the free().
There aren't many common architectures where this would be a problem,
but it can happen.



More information about the Comp.lang.c mailing list