From afe55cba3048151431b99423ebfb1ef8e41467fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 5 Dec 2005 09:20:32 +0000 Subject: [PATCH] (gss_add_cred): avoid deadlock git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16347 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/gssapi/add_cred.c | 3 ++- lib/gssapi/krb5/add_cred.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/gssapi/add_cred.c b/lib/gssapi/add_cred.c index 6c160333f..5850ed2aa 100644 --- a/lib/gssapi/add_cred.c +++ b/lib/gssapi/add_cred.c @@ -207,6 +207,8 @@ OM_uint32 gss_add_cred ( goto failure; } + HEIMDAL_MUTEX_unlock(&cred->cred_id_mutex); + ret = gss_inquire_cred(minor_status, cred, NULL, &lifetime, NULL, actual_mechs); if (ret) @@ -219,7 +221,6 @@ OM_uint32 gss_add_cred ( if (output_cred_handle) { *output_cred_handle = handle; - HEIMDAL_MUTEX_unlock(&cred->cred_id_mutex); } *minor_status = 0; diff --git a/lib/gssapi/krb5/add_cred.c b/lib/gssapi/krb5/add_cred.c index 6c160333f..5850ed2aa 100644 --- a/lib/gssapi/krb5/add_cred.c +++ b/lib/gssapi/krb5/add_cred.c @@ -207,6 +207,8 @@ OM_uint32 gss_add_cred ( goto failure; } + HEIMDAL_MUTEX_unlock(&cred->cred_id_mutex); + ret = gss_inquire_cred(minor_status, cred, NULL, &lifetime, NULL, actual_mechs); if (ret) @@ -219,7 +221,6 @@ OM_uint32 gss_add_cred ( if (output_cred_handle) { *output_cred_handle = handle; - HEIMDAL_MUTEX_unlock(&cred->cred_id_mutex); } *minor_status = 0;