Squash leak

svn path=/trunk/netsurf/; revision=6561
This commit is contained in:
John Mark Bell 2009-02-18 14:10:35 +00:00
parent ae781b4fd8
commit a3fecdf1fc

View File

@ -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;