Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > f2c9a24e570f82c24fd7074143d03478 > files > 40

nss_ldap-253-42.el5.src.rpm

--- pam_ldap-183/pam_ldap.c.orig	2010-10-19 08:26:17.214108202 +1100
+++ pam_ldap-183/pam_ldap.c	2010-10-21 12:53:56.665127726 +1100
@@ -437,6 +437,7 @@ static void
 _release_config (pam_ldap_config_t ** pconfig)
 {
   pam_ldap_config_t *c;
+  pam_ssd_t *ssd, *next_ssd;
 
   c = *pconfig;
   if (c == NULL)
@@ -448,6 +449,9 @@ _release_config (pam_ldap_config_t ** pc
   if (c->host != NULL)
     free (c->host);
 
+  if (c->uri != NULL)
+    free (c->uri);
+
   if (c->base != NULL)
     free (c->base);
 
@@ -474,6 +478,16 @@ _release_config (pam_ldap_config_t ** pc
       free (c->sslpath);
     }
 
+  ssd = c->ssd;
+  while ( ssd != NULL )
+    {
+      next_ssd = ssd->next;
+      free (ssd->base);
+      free (ssd->filter);
+      free (ssd);
+      ssd = next_ssd;
+    }
+
   if (c->userattr != NULL)
     {
       free (c->userattr);
@@ -504,6 +508,36 @@ _release_config (pam_ldap_config_t ** pc
       free (c->filter);
     }
 
+  if (c->tls_cacertfile != NULL)
+    {
+      free(c->tls_cacertfile);
+    }
+
+  if (c->tls_cacertdir != NULL)
+    {
+      free(c->tls_cacertdir);
+    }
+
+  if (c->tls_ciphers != NULL)
+    {
+      free(c->tls_ciphers);
+    }
+
+  if (c->tls_cert != NULL)
+    {
+      free(c->tls_cert);
+    }
+
+  if (c->tls_key != NULL)
+    {
+      free(c->tls_key);
+    }
+
+  if (c->tls_randfile != NULL)
+    {
+      free(c->tls_randfile);
+    }
+
   if (c->logdir != NULL)
     {
       free (c->logdir);
@@ -519,6 +553,7 @@ _release_config (pam_ldap_config_t ** pc
       free (c->password_prohibit_message);
     }
 
+
   memset (c, 0, sizeof (*c));
   free (c);
   *pconfig = NULL;