[PATCH] iconv add iconv_close before the function returned with bad value.
liqingqing
liqingqing3@huawei.com
Sat Dec 14 08:19:00 GMT 2019
add iconv_close before the function returned with bad value.
---
iconv/tst-iconv5.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/iconv/tst-iconv5.c b/iconv/tst-iconv5.c
index 15fd5d3ae2e..15d9629e7d9 100644
--- a/iconv/tst-iconv5.c
+++ b/iconv/tst-iconv5.c
@@ -72,7 +72,10 @@ convert (const char *tocode, const char *fromcode, char *inbufp,
{
printf ("iconv failed: from: %s, to: %s: %s",
fromcode, tocode, strerror (errno));
- return -1;
+
+ iconv_close (ic);
+
+ return -1;
}
}
--
2.23.0.windows.1
More information about the Libc-alpha
mailing list