]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
iconv add iconv_close before the function returned with bad value.
authorliqingqing <liqingqing3@huawei.com>
Mon, 21 Dec 2020 04:22:38 +0000 (09:52 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 21 Dec 2020 04:22:38 +0000 (09:52 +0530)
add iconv_close before the function returned with bad value.

iconv/tst-iconv5.c

index 8211843e4f57d18cd3ac1d25d67acbb1a64ee188..09cec9c4bf3bb99059ba11171ff0d2b3e54ea204 100644 (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;
        }
     }