Free credentials on exit.

This commit is contained in:
Armin Novak 2017-07-18 13:23:22 +02:00
parent b0411d4faa
commit 11fa9f6753
3 changed files with 12 additions and 1 deletions

View File

@ -1853,6 +1853,8 @@ void nla_free(rdpNla* nla)
if (nla->table)
{
SECURITY_STATUS status;
status = nla->table->FreeCredentialsHandle(&nla->credentials);
status = nla->table->DeleteSecurityContext(&nla->context);
if (status != SEC_E_OK)

View File

@ -381,7 +381,7 @@ SECURITY_STATUS SEC_ENTRY negotiate_FreeCredentialsHandle(PCredHandle phCredenti
return SEC_E_INVALID_HANDLE;
sspi_CredentialsFree(credentials);
sspi_SecureHandleInvalidate(phCredential);
return SEC_E_OK;
}

View File

@ -304,6 +304,15 @@ void* sspi_SecureHandleGetLowerPointer(SecHandle* handle)
return pointer;
}
void sspi_SecureHandleInvalidate(SecHandle* handle)
{
if (!handle)
return;
handle->dwLower = 0;
handle->dwUpper = 0;
}
void sspi_SecureHandleSetLowerPointer(SecHandle* handle, void* pointer)
{
if (!handle)