summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Carr <jfc@mit.edu>1992-08-21 02:50:22 +0000
committerJohn Carr <jfc@mit.edu>1992-08-21 02:50:22 +0000
commit1523eec16716cb5ee6b3a3de2a8127f08ef508a7 (patch)
treee4edb131e430c1b5862eecbfed976504ef273e1a
parent1c12e7bfdcba0e92699a9204d2c9a8782f62580e (diff)
downloadkrb5-1523eec16716cb5ee6b3a3de2a8127f08ef508a7.tar.gz
krb5-1523eec16716cb5ee6b3a3de2a8127f08ef508a7.tar.xz
krb5-1523eec16716cb5ee6b3a3de2a8127f08ef508a7.zip
Reduce the scope of the temporary assignment to tktauthent->ticket
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2342 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/lib/krb5/krb/rd_req_dec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/krb5/krb/rd_req_dec.c b/src/lib/krb5/krb/rd_req_dec.c
index eada12355..cb2c73a83 100644
--- a/src/lib/krb5/krb/rd_req_dec.c
+++ b/src/lib/krb5/krb/rd_req_dec.c
@@ -169,15 +169,17 @@ krb5_tkt_authent **authdat;
goto cleanup;
}
- tktauthent->ticket = req->ticket; /* only temporarily...allocated
- below */
/* only check rcache if sender has provided one---some services
may not be able to use replay caches (such as datagram servers) */
if (rcache) {
krb5_donot_replay rep;
- if (retval = krb5_auth_to_rep(tktauthent, &rep))
+ tktauthent->ticket = req->ticket; /* Temporary; allocated below */
+ retval = krb5_auth_to_rep(tktauthent, &rep);
+ tktauthent->ticket = 0; /* Don't allow cleanup to free
+ original ticket. */
+ if (retval)
goto cleanup;
retval = krb5_rc_store(rcache, &rep);
xfree(rep.server);
@@ -185,7 +187,6 @@ krb5_tkt_authent **authdat;
if (retval)
goto cleanup;
}
- tktauthent->ticket = 0;
/* if starttime is not in ticket, then treat it as authtime */
if (req->ticket->enc_part2->times.starttime != 0)