iconv add iconv_close before the function returned with bad value.

add iconv_close before the function returned with bad value.
This commit is contained in:
liqingqing 2020-12-21 09:52:38 +05:30 committed by Siddhesh Poyarekar
parent d4eb814027
commit 756608dbe8

View File

@ -72,6 +72,7 @@ convert (const char *tocode, const char *fromcode, char *inbufp,
{
printf ("iconv failed: from: %s, to: %s: %s",
fromcode, tocode, strerror (errno));
iconv_close (ic);
return -1;
}
}