PATCH : free(NULL) in cpphash.c

Philippe De Muyter
Tue Apr 4 21:59:00 GMT 2000

Zack Weinberg wrote :
> free(NULL) is defined to be a no-op, so the code should be safe as is.

No, free(NULL) can crash the program with many old malloc implementations.
That is also valid for realloc(NULL, ).


More information about the Gcc-patches mailing list