summaryrefslogtreecommitdiff
path: root/source3/nsswitch/pam_winbind.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch/pam_winbind.c')
-rw-r--r--source3/nsswitch/pam_winbind.c10
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, ...)
{