summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2011-09-27 15:05:44 +0000
committerGreg Hudson <ghudson@mit.edu>2011-09-27 15:05:44 +0000
commit084534554ea24fbf673ea568d43247a7109c7596 (patch)
tree5762682da446930a964f95ba0a3aa4feef7c874a /src
parent40c6667f1f058fa930b3b57519bb9a1267e8d2e2 (diff)
downloadkrb5-084534554ea24fbf673ea568d43247a7109c7596.tar.gz
krb5-084534554ea24fbf673ea568d43247a7109c7596.tar.xz
krb5-084534554ea24fbf673ea568d43247a7109c7596.zip
Fix an error case in encrypted timestamp preauth
If krb5_encrypt_helper returns an error, it's not the caller's responsibility to free enc_data.ciphertext, and in one case (if krb5_c_encrypt_length returns an error) it won't have been initialized. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25239 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/preauth2.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/krb5/krb/preauth2.c b/src/lib/krb5/krb/preauth2.c
index ed411e5dd..9807eeafd 100644
--- a/src/lib/krb5/krb/preauth2.c
+++ b/src/lib/krb5/krb/preauth2.c
@@ -678,10 +678,8 @@ pa_enc_timestamp(krb5_context context, krb5_kdc_req *request,
krb5_free_data(context, tmp);
- if (ret) {
- free(enc_data.ciphertext.data);
+ if (ret)
return(ret);
- }
ret = encode_krb5_enc_data(&enc_data, &tmp);