summaryrefslogtreecommitdiffstats
path: root/auth/credentials
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2014-11-28 17:24:09 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-01-26 19:56:57 +0100
commit4ea40ed0c1e054b26488158ded8cc0b7eda1c302 (patch)
tree8e7b418122cd4d1705045394a7209d99a6de639e /auth/credentials
parent94cd324be9a24fcdcbf0b1c4a9dfc7a49d074b8a (diff)
downloadsamba-4ea40ed0c1e054b26488158ded8cc0b7eda1c302.tar.gz
samba-4ea40ed0c1e054b26488158ded8cc0b7eda1c302.tar.xz
samba-4ea40ed0c1e054b26488158ded8cc0b7eda1c302.zip
auth/credentials_krb5: fix memory leak in cli_credentials_failed_kerberos_login().
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jan 26 19:56:57 CET 2015 on sn-devel-104
Diffstat (limited to 'auth/credentials')
-rw-r--r--auth/credentials/credentials_krb5.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/auth/credentials/credentials_krb5.c b/auth/credentials/credentials_krb5.c
index d968e200e7..77dbcd2c06 100644
--- a/auth/credentials/credentials_krb5.c
+++ b/auth/credentials/credentials_krb5.c
@@ -257,10 +257,12 @@ _PUBLIC_ bool cli_credentials_failed_kerberos_login(struct cli_credentials *cred
ret = krb5_cc_retrieve_cred(ccc->smb_krb5_context->krb5_context, ccc->ccache, KRB5_TC_MATCH_SRV_NAMEONLY, &creds, &creds2);
if (ret != 0) {
/* don't retry - we didn't find these credentials to remove */
+ krb5_free_cred_contents(ccc->smb_krb5_context->krb5_context, &creds);
return false;
}
ret = krb5_cc_remove_cred(ccc->smb_krb5_context->krb5_context, ccc->ccache, KRB5_TC_MATCH_SRV_NAMEONLY, &creds);
+ krb5_free_cred_contents(ccc->smb_krb5_context->krb5_context, &creds);
krb5_free_cred_contents(ccc->smb_krb5_context->krb5_context, &creds2);
if (ret != 0) {
/* don't retry - we didn't find these credentials to