HN Top New Show Ask Jobs

settings

Theme

Hand Mode

Feed

Comment by magicalhippo

Comment by magicalhippo 8 months ago

1 reply

View on Hacker News

Even the C89 draft[1] says passing null should do nothing, and as far as I can tell it's still[2] the case.

Which runtimes would this be?

[1]: http://jfxpt.com/library/c89-draft.html#4.10.3.2

[2]: https://en.cppreference.com/w/c/memory/free

tjalfi 8 months ago

I wish I didn't know this, but it could be SunOS4[0] which went out of support in 2003. It's probably the most well-known OS where free(NULL) wasn't supported. I would like to think that people aren't writing new code for it.

[0] https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg001...

Reply View | 0 replies