From d4c65184e13ab5c027df4698375a68293ab67cf0 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Tue, 26 Oct 2004 23:01:14 +0000 Subject: [PATCH] * mk_req_ext.c (krb5_mk_req_extended): Free keyblock before copying new one in. ticket: 2725 component: krb5-libs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16837 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 5 +++++ src/lib/krb5/krb/mk_req_ext.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 0286e5985..46483aca3 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,8 @@ +2004-10-26 Tom Yu + + * mk_req_ext.c (krb5_mk_req_extended): Free keyblock before + copying new one in. + 2004-10-14 Tom Yu * t_deltat.c (main): Unadorned integer no longer fails now that we diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c index cdb8f6950..deeb12387 100644 --- a/src/lib/krb5/krb/mk_req_ext.c +++ b/src/lib/krb5/krb/mk_req_ext.c @@ -138,6 +138,11 @@ krb5_mk_req_extended(krb5_context context, krb5_auth_context *auth_context, *auth_context = new_auth_context; } + if ((*auth_context)->keyblock != NULL) { + krb5_free_keyblock(context, (*auth_context)->keyblock); + (*auth_context)->keyblock = NULL; + } + /* set auth context keyblock */ if ((retval = krb5_copy_keyblock(context, &in_creds->keyblock, &((*auth_context)->keyblock)))) -- 2.26.2