Check for NULL not needed when calling free.