News for hackers. Stuff that matters.
Re: by po1nt on Wednesday October 01, 2025 @03:56AM (#45435401)
It shouldn't https://pubs.opengroup.org/onlinepubs/7908799/xsh/free.html

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

Re: by quietbritishjim on Wednesday October 01, 2025 @07:20AM (#45436451)
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.
Re: by jibal on Thursday October 02, 2025 @09:31AM (#45449368)
free(NULL) is a noop ever since C89 (I was on the standards committee, X3J11).