From 413bc00b4bb6bf2f69e563b4c4b0cf37fe809f93 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 6 Jan 1993 00:31:46 +0000 Subject: [PATCH] Fix logic in fcc_close(); krb5_fcc_close_file() should be called if a file is open. Using MAYBE_CLOSE() was just the wrong thing to use. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2478 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/file/fcc_close.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/ccache/file/fcc_close.c b/src/lib/krb5/ccache/file/fcc_close.c index 35087303c..ab1071ee6 100644 --- a/src/lib/krb5/ccache/file/fcc_close.c +++ b/src/lib/krb5/ccache/file/fcc_close.c @@ -47,7 +47,8 @@ krb5_fcc_close(id) { register int closeval = KRB5_OK; - MAYBE_CLOSE(id, closeval); + if (((krb5_fcc_data *) id->data)->fd >= 0) + krb5_fcc_close_file(id); xfree(((krb5_fcc_data *) id->data)->filename); xfree(((krb5_fcc_data *) id->data)); -- 2.26.2