Actually I was just saved a pile of debugging by this rule. I religiously
check for allocation failures, and actually have a bunch of macros to
assist: they provide a crude C exception-unwinding/deallocate-on-failure
facility, too, but most importantly they enable me to *distinguish*
between failure sites.
In this specific case the allocation failure was *right* at the place
where a huge leak was happening (as is likely when the leak is huge: a bit
of dmallocing and all the other leaks were fixed, too). Without error
trapping, all I'd have got would have been a core dump, and as the failure
happened on a live site which won't let us see core dumps because they
might well contain confidential data, I'd have been stuffed.