Remove unnecessary checks before calling free