From a2d71428c2b539e0d4dd8231429e5ebd2a54541e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 7 Feb 2007 22:30:08 +0000 Subject: [PATCH] Try to leak less memory in the failure case. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20198 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/gssapi/krb5/copy_ccache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/gssapi/krb5/copy_ccache.c b/lib/gssapi/krb5/copy_ccache.c index b4bb2c672..bc5ae2c5a 100644 --- a/lib/gssapi/krb5/copy_ccache.c +++ b/lib/gssapi/krb5/copy_ccache.c @@ -181,6 +181,11 @@ _gsskrb5_import_cred(OM_uint32 *minor_status, return GSS_S_COMPLETE; out: + gss_release_oid_set(minor_status, &handle->mechanisms); + if (handle->ccache) + krb5_cc_close(context, handle->ccache); + if (handle->keytab) + krb5_kt_close(context, handle->keytab); if (handle->principal) krb5_free_principal(context, handle->principal); HEIMDAL_MUTEX_destroy(&handle->cred_id_mutex);