From 0b0559e19e7829dfb2c53149d9f832d043c846d2 Mon Sep 17 00:00:00 2001 From: Ted Percival Date: Thu, 10 Dec 2009 15:14:10 -0700 Subject: [PATCH] Fix memory leak in fcc_move This usually occurs when re-initializing a file credential cache over the top of an existing one. This was meant to be fixed in commit 48cb3aa by calling fcc_destroy(), but that only unlinks the "from" file (which was already renamed or unlinked) but still doesn't free the in-memory credentials. Using fcc_close() instead of fcc_destroy() frees the leaked in-memory credentials. Signed-off-by: Love Hornquist Astrand --- lib/krb5/fcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/krb5/fcache.c b/lib/krb5/fcache.c index cda15e483..f1aeb31b0 100644 --- a/lib/krb5/fcache.c +++ b/lib/krb5/fcache.c @@ -954,7 +954,7 @@ fcc_move(krb5_context context, krb5_ccache from, krb5_ccache to) close(fd); } - fcc_destroy(context, from); + fcc_close(context, from); return ret; } -- 2.11.4.GIT