From: Theodore Tso Date: Wed, 6 Jan 1993 00:31:46 +0000 (+0000) Subject: Fix logic in fcc_close(); krb5_fcc_close_file() should be called if X-Git-Tag: krb5-1.0-beta3~345 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=413bc00b4bb6bf2f69e563b4c4b0cf37fe809f93;p=krb5.git 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 --- 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));