commit cc9265a82534fae317fc4cebf39f1e1b37ee774b
parent da53ff715e5687bc08d995d836af5dcfcdc43164
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 13 Jun 2010 14:49:20 +0000
close
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/common/convert.c b/src/common/convert.c
@@ -50,7 +50,10 @@ EXTRACTOR_common_convert_to_utf8 (const char *input, size_t len, const char *cha
tmpSize = 3 * len + 4;
tmp = malloc (tmpSize);
if (tmp == NULL)
- return NULL;
+ {
+ iconv_close (cd);
+ return NULL;
+ }
itmp = tmp;
finSize = tmpSize;
if (iconv (cd, (char **) &input, &len, &itmp, &finSize) == SIZE_MAX)