diff mbox series

[COMMITTED] iconv add iconv_close before the function returned with bad value.

Message ID 20201221042854.1467431-1-siddhesh@sourceware.org
State New
Headers show
Series [COMMITTED] iconv add iconv_close before the function returned with bad value. | expand

Commit Message

Siddhesh Poyarekar Dec. 21, 2020, 4:28 a.m. UTC
From: liqingqing <liqingqing3@huawei.com>

Fixed up whitespaces and committed -- Siddhesh

add iconv_close before the function returned with bad value.
---
 iconv/tst-iconv5.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/iconv/tst-iconv5.c b/iconv/tst-iconv5.c
index 8211843e4f..09cec9c4bf 100644
--- a/iconv/tst-iconv5.c
+++ b/iconv/tst-iconv5.c
@@ -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;
 	}
     }