From 0f06098e2ab419d02e89a1ca6bc9f2828f6bdb1e Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 18 Jun 2009 21:56:48 +0000 Subject: [PATCH] minor memory leak in 'none' replay cache type 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 tags: pullup target_version: 1.7.1 version_reported: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22417 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