How detect malloc failure?

According to the Single Unix Specification, malloc will return NULL and set errno when it fails.

Leave a Comment