From 3bc14af4ffb1fa522bdef687b64366c3fae5afdb Mon Sep 17 00:00:00 2001 From: John Kohl Date: Fri, 4 May 1990 17:07:05 +0000 Subject: [PATCH] copy addresses git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@738 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/get_in_tkt.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c index 38e9275e9..1fd883cf8 100644 --- a/src/lib/krb5/krb/get_in_tkt.c +++ b/src/lib/krb5/krb/get_in_tkt.c @@ -161,12 +161,18 @@ OLDDECLARG(krb5_ccache, ccache) creds->is_skey = FALSE; /* this is an AS_REQ, so cannot be encrypted in skey */ creds->ticket_flags = as_reply->enc_part2->flags; + if (retval = krb5_copy_addresses(dec_rep->enc_part2->caddrs, + &cred->addresses)) { + cleanup_key(); + return retval; + } creds->second_ticket.length = 0; creds->second_ticket.data = 0; retval = encode_krb5_ticket(as_reply->ticket, &packet); krb5_free_kdc_rep(as_reply); if (retval) { + krb5_free_address(creds->addresses); cleanup_key(); return retval; } @@ -177,6 +183,7 @@ OLDDECLARG(krb5_ccache, ccache) if (retval = krb5_cc_store_cred(ccache, creds)) { /* clean up the pieces */ free((char *)creds->ticket.data); + krb5_free_address(creds->addresses); cleanup_key(); return retval; } -- 2.26.2