Reverse order of HEIMDAL_MUTEX_unlock and gss_release_cred to avoid

deadlock, from Luke Howard <lukeh@padl.com>.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14360 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2004-11-30 19:27:11 +00:00
parent 96f866ff05
commit 08bb397dbc
2 changed files with 4 additions and 2 deletions

View File

@@ -114,9 +114,10 @@ OM_uint32 gss_inquire_cred
}
ret = GSS_S_COMPLETE;
out:
HEIMDAL_MUTEX_unlock(&cred->cred_id_mutex);
if (cred_handle == GSS_C_NO_CREDENTIAL)
ret = gss_release_cred(minor_status, &cred);
HEIMDAL_MUTEX_unlock(&cred->cred_id_mutex);
return ret;
}

View File

@@ -114,9 +114,10 @@ OM_uint32 gss_inquire_cred
}
ret = GSS_S_COMPLETE;
out:
HEIMDAL_MUTEX_unlock(&cred->cred_id_mutex);
if (cred_handle == GSS_C_NO_CREDENTIAL)
ret = gss_release_cred(minor_status, &cred);
HEIMDAL_MUTEX_unlock(&cred->cred_id_mutex);
return ret;
}