Like eliteraspberrie said, the proper way to recover from an error is to unroll your stack back to your main function and return 1 there.
Error checking was enforced for EVERY syscall, be it malloc() or open(). Checking for errors was indeed required but not enough: proper and graceful shut down was required too.