File pam_ldap-leaks-in-config.patch of Package pam_ldap.15731
Index: pam_ldap-186/pam_ldap.c
===================================================================
--- pam_ldap-186.orig/pam_ldap.c
+++ pam_ldap-186/pam_ldap.c
@@ -446,6 +446,9 @@ _release_config (pam_ldap_config_t ** pc
if (c->configFile != NULL)
free (c->configFile);
+ if (c->uri != NULL)
+ free (c->uri);
+
if (c->host != NULL)
free (c->host);
@@ -534,6 +537,25 @@ _release_config (pam_ldap_config_t ** pc
p_ssd = p_ssd_next;
};
}
+
+ 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);
+
memset (c, 0, sizeof (*c));
free (c);
*pconfig = NULL;