copy addresses
authorJohn Kohl <jtkohl@mit.edu>
Fri, 4 May 1990 17:07:05 +0000 (17:07 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Fri, 4 May 1990 17:07:05 +0000 (17:07 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@738 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/get_in_tkt.c

index 38e9275e90e62c8f7d3759c97abd6397480005a3..1fd883cf8c66f8ebf9f8bcbb32eaf6ed96dc218d 100644 (file)
@@ -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;
     }