lib:charset: Remove use of talloc_autofree_context() for global_iconv_handle
authorJeremy Allison <jra@samba.org>
Tue, 11 Apr 2017 23:06:08 +0000 (16:06 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 18 Apr 2017 09:47:17 +0000 (11:47 +0200)
All other callers use NULL here anyway, so there's no
need to use a special context for get_iconv_handle().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/util/charset/codepoints.c

index 3bfb5cc71e894c0cf4ef8c611f12f1cd5a958312..3f380b9fed6a762057b1cfe80edd0779c3129f56 100644 (file)
@@ -16506,9 +16506,15 @@ static struct smb_iconv_handle *global_iconv_handle = NULL;
 
 struct smb_iconv_handle *get_iconv_handle(void)
 {
-       if (global_iconv_handle == NULL)
-               global_iconv_handle = smb_iconv_handle_reinit(talloc_autofree_context(),
-                                                             "ASCII", "UTF-8", true, NULL);
+       if (global_iconv_handle == NULL) {
+               global_iconv_handle =
+                       smb_iconv_handle_reinit(NULL,
+                                               "ASCII",
+                                               "UTF-8",
+                                               true,
+                                               NULL);
+       }
+
        return global_iconv_handle;
 }