free krb5_ccache on error, cid#49

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24125 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-12-11 05:03:58 +00:00
parent 62965c76dd
commit d97b2360b9

View File

@@ -133,12 +133,13 @@ get_ccache(krb5_context context, int *destroy, krb5_ccache *id)
return 0;
out:
if (*destroy)
krb5_cc_destroy(context, *id);
else
krb5_cc_close(context, *id);
*id = NULL;
if (*id) {
if (*destroy)
krb5_cc_destroy(context, *id);
else
krb5_cc_close(context, *id);
*id = NULL;
}
if (kt)
krb5_kt_close(context, kt);