From: Greg Hudson Date: Tue, 27 Sep 2011 15:05:44 +0000 (+0000) Subject: Fix an error case in encrypted timestamp preauth X-Git-Tag: krb5-1.10-alpha1~136 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=084534554ea24fbf673ea568d43247a7109c7596;p=krb5.git 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 --- 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);