summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1991-02-20 17:04:20 +0000
committerJohn Kohl <jtkohl@mit.edu>1991-02-20 17:04:20 +0000
commitb7dffdc1d4732f5697992a9e8fbba4f7ed5633ff (patch)
tree23e962e61e49bca24587f9e344e8acf083362089
parent924db000f13b8695285b3bc75726c0cf8c7a0685 (diff)
downloadkrb5-b7dffdc1d4732f5697992a9e8fbba4f7ed5633ff.tar.gz
krb5-b7dffdc1d4732f5697992a9e8fbba4f7ed5633ff.tar.xz
krb5-b7dffdc1d4732f5697992a9e8fbba4f7ed5633ff.zip
didn't plug memory leak properly last time
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1740 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/lib/krb5/rcache/rc_dfl.c16
1 files changed, 8 insertions, 8 deletions
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. */