summaryrefslogtreecommitdiff
path: root/pith/charconv
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-06-16 17:37:24 -0600
committerEduardo Chappa <chappa@washington.edu>2018-06-16 17:37:24 -0600
commit702a71b7cd83ad8881bce5d996bff7a86e35b117 (patch)
treecde02f7f904dd7c8e5dac3152c5f2a189e4b4e95 /pith/charconv
parent19dfafb6bc3ed0d37036f21813b753a4dca91e52 (diff)
downloadalpine-702a71b7cd83ad8881bce5d996bff7a86e35b117.tar.xz
* Clear up some memory so that valgrind does not complain.
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);
}