iconv: Use a static buffer in iconf not to spoil the talloc_pool
commit70dfb51430bc3b6e436fb5c5452d7ef8612ca02f
authorVolker Lendecke <vl@samba.org>
Fri, 6 Dec 2013 10:31:07 +0000 (6 10:31 +0000)
committerStefan Metzmacher <metze@samba.org>
Sat, 14 Dec 2013 09:06:28 +0000 (14 10:06 +0100)
treed6602a2bdb8f4ff61e13665c586bec2490e71e59
parenta9753c180fbd06764987367fe3115159cdef4330
iconv: Use a static buffer in iconf not to spoil the talloc_pool

This is a buffer that is strictly used like a stack variable. This
patch makes it one and while there it fixes an error path memleak.
In the "pull_failed" case we did not talloc_free(cvtbuf). With
talloc_tos(), this does not really matter, but for code without
this it does.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/util/charset/iconv.c