summaryrefslogtreecommitdiff
path: root/source3/lib/charcnv.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/charcnv.c')
-rw-r--r--source3/lib/charcnv.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index ae04fd9ffb..097d746a63 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -102,6 +102,23 @@ void lazy_initialize_conv(void)
}
/**
+ * Destroy global objects allocated by init_iconv()
+ **/
+void gfree_charcnv(void)
+{
+ int c1, c2;
+
+ for (c1=0;c1<NUM_CHARSETS;c1++) {
+ for (c2=0;c2<NUM_CHARSETS;c2++) {
+ if ( conv_handles[c1][c2] ) {
+ smb_iconv_close( conv_handles[c1][c2] );
+ conv_handles[c1][c2] = 0;
+ }
+ }
+ }
+}
+
+/**
* Initialize iconv conversion descriptors.
*
* This is called the first time it is needed, and also called again