Comment 6 for bug 331095

Revision history for this message
Matthew Fuller (fullermd) wrote : Re: [Bug 331095] Re: patiencediff tries to malloc 0 bytes; tests fail on AIX

> Actually it seems it is portable that free(NULL) is a no-op, so #1
> is the way to go.

It's common, but not necessary; free(NULL) falls into undefined
behavior, and it's possible that some cases may cause nasal demons.
Older versions of dmalloc errored by default on it, for instance.

That said, I don't offhand know of any current or not-so-current
system malloc implementation that chokes on it.