summaryrefslogtreecommitdiff
path: root/pith/charconv
diff options
context:
space:
mode:
Diffstat (limited to 'pith/charconv')
-rw-r--r--pith/charconv/utf8.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pith/charconv/utf8.c b/pith/charconv/utf8.c
index b7d79d7b..373f4b62 100644
--- a/pith/charconv/utf8.c
+++ b/pith/charconv/utf8.c
@@ -280,6 +280,10 @@ convert_to_utf8(char *str, char *fromcharset, int flags)
}
/* else no conversion necessary */
+ if(result.data)
+ fs_give((void **) &result.data);
+ result.size = 0;
+
return(ret);
}