From 924db000f13b8695285b3bc75726c0cf8c7a0685 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Wed, 20 Feb 1991 16:04:15 +0000 Subject: [PATCH] plug a memory leak git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1739 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/rcache/rc_dfl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/krb5/rcache/rc_dfl.c b/src/lib/krb5/rcache/rc_dfl.c index 10c5eb269..d0aba4fce 100644 --- a/src/lib/krb5/rcache/rc_dfl.c +++ b/src/lib/krb5/rcache/rc_dfl.c @@ -349,6 +349,11 @@ krb5_rcache id; 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); } } end_loop: krb5_rc_io_unmark(&t->d); -- 2.26.2