If you build with gcc -Wall, e.g. with the default RHEL rpm flags, you'll see a lot of warnings about ignored return values of functions, and a good fraction of the ones I've checked look as if they should be fixed.
The most frequently-reported is asprintf, where the code checks for errors by looking for a NULL buffer afterwards. That's apparently OK for BSD, but the glibc documentation says the buffer is undefined on error.