commit eb130cbe507a9877d59d444065140960a828af67
parent ad9ddd799eff250b2f7a7a8752a9ffed282c2f98
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Fri, 5 Feb 2016 10:43:15 +0100
Fix a null pointer dereference introduced by 54adfb4.
acc_pass is pointing to same address as pass, and we are inside
an if block that includes "!pass" condition, so trying to zero
and free acc_pass is a wrong thing to do.
Diffstat:
1 file changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/imap.c b/src/imap.c
@@ -1274,8 +1274,6 @@ try_again:
account->userid,
&(account->session_passwd));
if (!tmp_pass) {
- memset(acc_pass, 0, strlen(acc_pass));
- g_free(acc_pass);
return MAILIMAP_NO_ERROR;
}
Xstrdup_a(pass, tmp_pass, {g_free(tmp_pass); return MAILIMAP_NO_ERROR;});