From: John Kohl Date: Wed, 20 Feb 1991 17:04:20 +0000 (+0000) Subject: didn't plug memory leak properly last time X-Git-Tag: krb5-1.0-alpha4~232 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b7dffdc1d4732f5697992a9e8fbba4f7ed5633ff;p=krb5.git didn't plug memory leak properly last time git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1740 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/rcache/rc_dfl.c b/src/lib/krb5/rcache/rc_dfl.c index d0aba4fce..07b89ca03 100644 --- a/src/lib/krb5/rcache/rc_dfl.c +++ b/src/lib/krb5/rcache/rc_dfl.c @@ -345,17 +345,17 @@ krb5_rcache id; case KRB5_RC_IO_EOF: FREE3; goto end_loop; case 0: break; default: FREE3; CLOSE; return KRB5_RC_IO; break; } - if (alive(rep,t->lifespan) != CMP_EXPIRED) + if (alive(rep,t->lifespan) != CMP_EXPIRED) { if (store(id,rep) == CMP_MALLOC) {/* can't be a replay */ CLOSE; return KRB5_RC_MALLOC; - } else { - /* store() copies the server & client fields to make sure they don't get - stomped on by other callers, so we need to free them */ - FREE(rep->server); - FREE(rep->client); - } - } + } + /* store() copies the server & client fields to make sure they don't get + stomped on by other callers, so we need to free them */ + FREE(rep->server); + FREE(rep->client); + } else FREE3; /* don't need it anymore, punt! */ + } end_loop: krb5_rc_io_unmark(&t->d); /* An automatic expunge here could remove the need for mark/unmark but would be inefficient. */