summaryrefslogtreecommitdiff
path: root/pith/ldap.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2019-05-04 12:41:11 -0600
committerEduardo Chappa <chappa@washington.edu>2019-05-04 12:41:11 -0600
commitc024a78dbaa9b42db7f18b0fea1894c41e2b0d67 (patch)
tree441e7308e4577ac8766c44edda682704aa432262 /pith/ldap.c
parent19cde66486e27063a9af8cfd79c6eb7f106b9111 (diff)
downloadalpine-c024a78dbaa9b42db7f18b0fea1894c41e2b0d67.tar.xz
* Initial release of XOAUTH2 authentication support in Alpine for
Gmail.
Diffstat (limited to 'pith/ldap.c')
-rw-r--r--pith/ldap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pith/ldap.c b/pith/ldap.c
index acf592db..f56592d2 100644
--- a/pith/ldap.c
+++ b/pith/ldap.c
@@ -556,7 +556,7 @@ ldap_lookup(LDAP_SERV_S *info, char *string, CUSTOM_FILT_S *cust,
}
else if(!ps_global->intr_pending){
int proto = 3, tlsmustbail = 0;
- char pwd[NETMAXPASSWD], user[NETMAXUSER];
+ char *pwd = NULL, user[NETMAXUSER];
#ifdef _WINDOWS
char *passwd = NULL;
#else
@@ -634,7 +634,7 @@ try_password_again:
if(!tlsmustbail){
snprintf(pmt, sizeof(pmt), " %s", (info->nick && *info->nick) ? info->nick : serv);
- mm_login_work(&mb, user, pwd, pwdtrial, pmt, info->binddn);
+ mm_login_work(&mb, user, &pwd, pwdtrial, pmt, info->binddn);
if(pwd && pwd[0])
#ifdef _WINDOWS
passwd = pwd;
@@ -1172,6 +1172,8 @@ try_password_again:
}
}
}
+ if(pwd)
+ fs_give((void **) &pwd);
}
if(we_cancel)