Remove redundant null checks.

It's guaranteed by the C specification that calling free() with NULL is safe.