From 04a8f6f3ac5c53998ed4a0c9025bbdba143cde43 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Mon, 4 May 2009 19:43:36 +0000 Subject: [PATCH] Simplify cleanup in obtain_sam_padata slightly git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22308 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/preauth.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/krb5/krb/preauth.c b/src/lib/krb5/krb/preauth.c index 2ef38c2c5..3a99c9dfa 100644 --- a/src/lib/krb5/krb/preauth.c +++ b/src/lib/krb5/krb/preauth.c @@ -455,7 +455,7 @@ static krb5_error_code obtain_sam_padata(krb5_context context, krb5_pa_data *in_padata, krb5_etype_info etype_info, krb5_keyblock *def_enc_key, git_key_proc key_proc, krb5_const_pointer key_seed, krb5_creds *creds, krb5_kdc_req *request, krb5_pa_data **out_padata) { krb5_error_code retval; - krb5_data * scratch; + krb5_data * scratch = 0; krb5_data tmpsam; krb5_pa_data * pa; krb5_sam_challenge *sam_challenge = 0; @@ -566,9 +566,7 @@ obtain_sam_padata(krb5_context context, krb5_pa_data *in_padata, krb5_etype_info retval = 0; cleanup: - if (scratch) - krb5_free_data(context, scratch); - if (sam_challenge) - free(sam_challenge); + krb5_free_data(context, scratch); + free(sam_challenge); return retval; } -- 2.26.2