[Commits] [SCM] claws branch, master, updated. 3.15.0-114-g2e90cf5

ticho at claws-mail.org ticho at claws-mail.org
Sun Jul 16 17:54:13 CEST 2017


The branch, master has been updated
       via  2e90cf549d7ecee6b35814a7701363954f6787c1 (commit)
      from  75bec58016c944e21c0395fef399db039c5acfd5 (commit)

Summary of changes:
 src/plugins/managesieve/sieve_prefs.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 2e90cf549d7ecee6b35814a7701363954f6787c1
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sun Jul 16 17:53:38 2017 +0200

    Managesieve: fix memory leak when saving password from account prefs

diff --git a/src/plugins/managesieve/sieve_prefs.c b/src/plugins/managesieve/sieve_prefs.c
index fb4a360..9aaeebe 100644
--- a/src/plugins/managesieve/sieve_prefs.c
+++ b/src/plugins/managesieve/sieve_prefs.c
@@ -377,9 +377,10 @@ static gint sieve_prefs_account_apply(struct SieveAccountPage *page)
 
 	config->host = gtk_editable_get_chars(GTK_EDITABLE(page->host_entry), 0, -1);
 	config->userid = gtk_editable_get_chars(GTK_EDITABLE(page->uid_entry), 0, -1);
-	passwd_store_set_account(page->account->account_id, "sieve",
-			gtk_editable_get_chars(GTK_EDITABLE(page->pass_entry), 0, -1),
-			FALSE);
+	gchar *pwd = gtk_editable_get_chars(GTK_EDITABLE(page->pass_entry), 0, -1);
+	passwd_store_set_account(page->account->account_id, "sieve", pwd, FALSE);
+	memset(pwd, 0, strlen(pwd));
+	g_free(pwd);
 	config->auth_type = combobox_get_active_data(GTK_COMBO_BOX(page->auth_menu));
 
 	sieve_prefs_account_set_config(page->account, config);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list