Call iconv_close along error path out of function.