summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-12-28 14:21:26 -0500
committerJeff Layton <jlayton@samba.org>2010-12-28 09:23:35 -0500
commite3c9b40fbe124bda174753785772e56344c68968 (patch)
treebde15181decc45b1dfa13bb919eed7ed66ef77e2
parent3e15450d879a42598a2596f2f1f535e95d423057 (diff)
downloadcifs-utils-e3c9b40fbe124bda174753785772e56344c68968.tar.gz
cifs-utils-e3c9b40fbe124bda174753785772e56344c68968.tar.bz2
cifs-utils-e3c9b40fbe124bda174753785772e56344c68968.zip
cifs.upcall: fix memory and call krb5_auth_con_free()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--cifs.upcall.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cifs.upcall.c b/cifs.upcall.c
index 9b1436e..9116e56 100644
--- a/cifs.upcall.c
+++ b/cifs.upcall.c
@@ -313,13 +313,15 @@ cifs_krb5_get_req(const char *principal, const char *ccname,
if (ret) {
syslog(LOG_DEBUG, "%s: unable to get session key for %s",
__func__, principal);
- goto out_free_creds;
+ goto out_free_auth;
}
*mechtoken = data_blob(apreq_pkt.data, apreq_pkt.length);
*sess_key = data_blob(KRB5_KEY_DATA(tokb), KRB5_KEY_LENGTH(tokb));
krb5_free_keyblock(context, tokb);
+out_free_auth:
+ krb5_auth_con_free(context, auth_context);
out_free_creds:
krb5_free_creds(context, out_creds);
out_free_principal: