projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
75bec58
)
Managesieve: fix memory leak when saving password from account prefs
author
Andrej Kacian
<ticho@claws-mail.org>
Sun, 16 Jul 2017 15:53:38 +0000
(17:53 +0200)
committer
Andrej Kacian
<ticho@claws-mail.org>
Sun, 16 Jul 2017 15:53:38 +0000
(17:53 +0200)
src/plugins/managesieve/sieve_prefs.c
patch
|
blob
|
history
diff --git
a/src/plugins/managesieve/sieve_prefs.c
b/src/plugins/managesieve/sieve_prefs.c
index fb4a360c726a3d51234515ea23cca4d31bac7114..9aaeebe12abf36fd515aded504791096f72f2b54 100644
(file)
--- 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);
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);
config->auth_type = combobox_get_active_data(GTK_COMBO_BOX(page->auth_menu));
sieve_prefs_account_set_config(page->account, config);