top | item 45435401

(no title)

po1nt | 5 months ago

It shouldn't https://pubs.opengroup.org/onlinepubs/7908799/xsh/free.html

>If ptr is a null pointer, no action occurs.

discuss

order

quietbritishjim|5 months ago

While I agree it shouldn't, that particular document is the UNIX specification, not the C specification, so it does not apply to C compilers on non-UNIX platforms.

jibal|5 months ago

free(NULL) is a noop ever since C89 (I was on the standards committee, X3J11).