diff options
author | Gerald Carter <jerry@samba.org> | 2006-04-08 17:25:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:55 -0500 |
commit | bbf666e447132a5f6b206ddf9ca918298b756392 (patch) | |
tree | 3cac70deddd159edbd7fb3aece639c48e9a5e67e /source3/lib/charcnv.c | |
parent | c9c502442b40aba97de17456ba948effcdfa3d05 (diff) | |
download | samba-bbf666e447132a5f6b206ddf9ca918298b756392.tar.gz samba-bbf666e447132a5f6b206ddf9ca918298b756392.tar.bz2 samba-bbf666e447132a5f6b206ddf9ca918298b756392.zip |
r15003: patch based on code from Arkady Glabek <aglabek@centeris.com> to ensure that global memory is freed when unloading pam_winbind.so (needs more testing on non-linux platforms)
(This used to be commit 1e0b79e591d70352a96e0a0487d8f394dc7b36ba)
Diffstat (limited to 'source3/lib/charcnv.c')
-rw-r--r-- | source3/lib/charcnv.c | 17 |
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 |