]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix uncommon leak in krb5_init_creds_step()
authorGreg Hudson <ghudson@mit.edu>
Sun, 26 Jul 2015 17:21:47 +0000 (13:21 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 29 Jul 2015 20:31:19 +0000 (16:31 -0400)
Release any previous value of ctx->err_padata before setting it in
init_creds_step_reply().  It could have a prior value after a realm
referral or retriable error.

ticket: 8223
target_version: 1.13.3
tags: pullup

src/lib/krb5/krb/get_in_tkt.c

index fa8afcc38db26ce7eb8e0337f80ab3beaed69719..4343a4b80377487b347ab90b0356d4046169205b 100644 (file)
@@ -1428,6 +1428,8 @@ init_creds_step_reply(krb5_context context,
         ctx->request->client->type == KRB5_NT_ENTERPRISE_PRINCIPAL;
 
     if (ctx->err_reply != NULL) {
+        krb5_free_pa_data(context, ctx->err_padata);
+        ctx->err_padata = NULL;
         code = krb5int_fast_process_error(context, ctx->fast_state,
                                           &ctx->err_reply, &ctx->err_padata,
                                           &retry);