4 ms·
free(NULL) is required to be a no-op by the ISO C standard.
by int_19h 4y ago
free(NULL) is required to be a no-op by the ISO C standard.
- monocasa 4y agoOh, good call. I had that backwards in my memory. The issue is when you give out non NULL pointers to zero sized objects, you have to make sure to give out unique pointer bit patterns at least versus nonzero sized objects so that the matching calls to free don't stomp on eachother.