Don't check for null before free().

According to the C standard free(NULL) is a no‐op. So no need to check for null before calling free().