From a3fecdf1fcd01f00671a37749acceaefbcf3dbd9 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 18 Feb 2009 14:10:35 +0000 Subject: Squash leak svn path=/trunk/netsurf/; revision=6561 --- utils/utf8.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils/utf8.c') diff --git a/utils/utf8.c b/utils/utf8.c index 840c5e1e6..fae9ccc30 100644 --- a/utils/utf8.c +++ b/utils/utf8.c @@ -502,6 +502,8 @@ utf8_convert_ret utf8_convert(const char *string, size_t len, if (iconv(cd, &in, &slen, &out, &rlen) == (size_t)-1) { free(temp); /* clear the cached conversion descriptor as it's invalid */ + if (last_cd.cd) + iconv_close(last_cd.cd); last_cd.from[0] = '\0'; last_cd.to[0] = '\0'; last_cd.cd = 0; -- cgit v1.2.3