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/nsswitch | |
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/nsswitch')
-rw-r--r-- | source3/nsswitch/pam_winbind.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index d78d65287e..2db10b69a8 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -17,6 +17,16 @@ #define MAX_PASSWD_TRIES 3 +/******************************************************************* + Need this destructor to free global memory when the shared library + is unloaded +*******************************************************************/ + +void __attribute__ ((destructor)) _fini_pam_winbind(void) +{ + gfree_all(); +} + /* some syslogging */ static void _pam_log(int err, const char *format, ...) { |