From: Greg Hudson Date: Thu, 17 Dec 2009 20:03:16 +0000 (+0000) Subject: Fix a cleanup handler in the store_creds code; krb5_cc_close doesn't X-Git-Tag: krb5-1.8-alpha1~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a0f14faa5b6ace43ce98af840c560565ccb0a27a;p=krb5.git Fix a cleanup handler in the store_creds code; krb5_cc_close doesn't handle NULL arguments, so we have to check. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23480 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/store_cred.c b/src/lib/gssapi/krb5/store_cred.c index a8ed6ffbb..65c903b58 100644 --- a/src/lib/gssapi/krb5/store_cred.c +++ b/src/lib/gssapi/krb5/store_cred.c @@ -126,8 +126,8 @@ copy_initiator_creds(OM_uint32 *minor_status, cleanup: if (kcred != NULL) k5_mutex_unlock(&kcred->lock); - - krb5_cc_close(context, ccache); + if (ccache != NULL) + krb5_cc_close(context, ccache); krb5_free_context(context); return major_status;