[Commits] [SCM] claws branch, master, updated. 3.15.0-24-g8e40e71
ticho at claws-mail.org
ticho at claws-mail.org
Wed Apr 12 17:36:38 CEST 2017
The branch, master has been updated
via 8e40e71a285b8cfcf49b33caa842dc2d4ed439f0 (commit)
from 6c2eb37a0cef876017822a4ddae92c7af1125280 (commit)
Summary of changes:
src/editldap.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 8e40e71a285b8cfcf49b33caa842dc2d4ed439f0
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Wed Apr 12 17:36:07 2017 +0200
Fix a memory leak around password field in editldap.c.
diff --git a/src/editldap.c b/src/editldap.c
index 70d53aa..660e231 100644
--- a/src/editldap.c
+++ b/src/editldap.c
@@ -903,7 +903,7 @@ static void edit_ldap_clear_fields(void) {
*/
static void edit_ldap_set_fields( LdapServer *server ) {
LdapControl *ctl;
- gchar *crit;
+ gchar *crit, *pwd;
if( ldapsvr_get_name( server ) )
gtk_entry_set_text(GTK_ENTRY(ldapedit.entry_name),
@@ -919,8 +919,15 @@ static void edit_ldap_set_fields( LdapServer *server ) {
if( ctl->bindDN )
gtk_entry_set_text(
GTK_ENTRY(ldapedit.entry_bindDN), ctl->bindDN );
+
+ pwd = passwd_store_get(PWS_CORE, "LDAP", ctl->hostName);
gtk_entry_set_text( GTK_ENTRY(ldapedit.entry_bindPW),
- passwd_store_get(PWS_CORE, "LDAP", ctl->hostName));
+ (pwd ? pwd : ""));
+ if (pwd != NULL) {
+ memset(pwd, 0, strlen(pwd));
+ g_free(pwd);
+ }
+
gtk_spin_button_set_value(
GTK_SPIN_BUTTON(ldapedit.spinbtn_timeout), ctl->timeOut );
gtk_spin_button_set_value(
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list