From 29c3b20975d80aa67ee0687d7497c1dd9ed402f5 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 9 Dec 2011 17:57:52 +0000 Subject: [PATCH] Fix subkey memory leak in krb5_get_credentials If a get_credentials operation requires multiple TGS requests, we need to free the subkey from previous requests before saving a new one. ticket: 7049 target_version: 1.10 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25536 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/get_creds.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/krb5/krb/get_creds.c b/src/lib/krb5/krb/get_creds.c index b009e6100..21cb22d1c 100644 --- a/src/lib/krb5/krb/get_creds.c +++ b/src/lib/krb5/krb/get_creds.c @@ -275,6 +275,8 @@ make_request(krb5_context context, krb5_tkt_creds_context ctx, if (code) return code; + krb5_free_keyblock(context, ctx->subkey); + ctx->subkey = NULL; code = krb5int_make_tgs_request(context, ctx->fast_state, ctx->cur_tgt, ctx->kdcopt, ctx->cur_tgt->addresses, NULL, -- 2.26.2