From: Theodore Tso Date: Tue, 21 Sep 1993 23:22:19 +0000 (+0000) Subject: Remove deference of freed structure X-Git-Tag: krb5-1.0-beta3~193 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cfd12c6c08848b1621ae155a5a500cb503ca18eb;p=krb5.git Remove deference of freed structure git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2645 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/rcache/rc_dfl.c b/src/lib/krb5/rcache/rc_dfl.c index de333c00f..e667eb17c 100644 --- a/src/lib/krb5/rcache/rc_dfl.c +++ b/src/lib/krb5/rcache/rc_dfl.c @@ -499,6 +499,7 @@ krb5_rcache id; char *name = t->name; krb5_error_code retval; krb5_rcache tmp; + krb5_deltat lifespan = t->lifespan; /* save original lifespan */ (void) krb5_rc_dfl_close(id); retval = krb5_rc_dfl_resolve(id, name); @@ -507,6 +508,7 @@ krb5_rcache id; retval = krb5_rc_dfl_recover(id); if (retval) return retval; + t = (struct dfl_data *)id->data; /* point to recovered cache */ tmp = (krb5_rcache) malloc(sizeof(*tmp)); if (!tmp) return ENOMEM; @@ -516,7 +518,7 @@ krb5_rcache id; retval = krb5_rc_resolve(tmp, 0); if (retval) return retval; - retval = krb5_rc_initialize(tmp, t->lifespan); + retval = krb5_rc_initialize(tmp, lifespan); if (retval) return retval; for (q = t->a;q;q = q->na) {