From 1c89e9942c3314309a17b99ac51f2a932572f3a2 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Mon, 28 Sep 2009 20:58:54 +0000 Subject: [PATCH] pull up r22417 from trunk ------------------------------------------------------------------------ r22417 | raeburn | 2009-06-18 17:56:48 -0400 (Thu, 18 Jun 2009) | 13 lines ticket: 6514 subject: minor memory leak in 'none' replay cache type tags: pullup target_version: 1.7.1 version_reported: 1.7 The replay cache type implementations are responsible for freeing the main rcache structure when the cache handle is closed. The 'none' rcache type wasn't doing this, resulting in a small memory leak each time such a cache was opened and closed. Not a big deal for a server process servicing a single client, but it could accumulate (very very slowly) for a long-running server. ticket: 6514 version_fixed: 1.7.1 status: resolved git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-7@22800 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/rcache/rc_none.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/rcache/rc_none.c b/src/lib/krb5/rcache/rc_none.c index 255dec9e3..a0ffed3a4 100644 --- a/src/lib/krb5/rcache/rc_none.c +++ b/src/lib/krb5/rcache/rc_none.c @@ -44,10 +44,16 @@ krb5_rc_none_noargs(krb5_context ctx, krb5_rcache rc) return 0; } #define krb5_rc_none_recover krb5_rc_none_noargs -#define krb5_rc_none_destroy krb5_rc_none_noargs -#define krb5_rc_none_close krb5_rc_none_noargs #define krb5_rc_none_expunge krb5_rc_none_noargs +static krb5_error_code KRB5_CALLCONV +krb5_rc_none_close(krb5_context ctx, krb5_rcache rc) +{ + free (rc); + return 0; +} +#define krb5_rc_none_destroy krb5_rc_none_close + static krb5_error_code KRB5_CALLCONV krb5_rc_none_store(krb5_context ctx, krb5_rcache rc, krb5_donot_replay *r) { -- 2.26.2