Local change to free zi on error to satisfy static analysis.