wininet: Don't call DeleteSecurityContext and FreeCredentialsHandle on invalid handles.
This commit is contained in:
parent
bdc81d9963
commit
8c6ac00820
|
@ -1341,7 +1341,9 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
|
|||
|
||||
if (lpwhr->pAuthInfo)
|
||||
{
|
||||
if (SecIsValidHandle(&lpwhr->pAuthInfo->ctx))
|
||||
DeleteSecurityContext(&lpwhr->pAuthInfo->ctx);
|
||||
if (SecIsValidHandle(&lpwhr->pAuthInfo->cred))
|
||||
FreeCredentialsHandle(&lpwhr->pAuthInfo->cred);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, lpwhr->pAuthInfo->auth_data);
|
||||
|
@ -1351,7 +1353,9 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
|
|||
}
|
||||
if (lpwhr->pProxyAuthInfo)
|
||||
{
|
||||
if (SecIsValidHandle(&lpwhr->pProxyAuthInfo->ctx))
|
||||
DeleteSecurityContext(&lpwhr->pProxyAuthInfo->ctx);
|
||||
if (SecIsValidHandle(&lpwhr->pProxyAuthInfo->cred))
|
||||
FreeCredentialsHandle(&lpwhr->pProxyAuthInfo->cred);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, lpwhr->pProxyAuthInfo->auth_data);
|
||||
|
|
Loading…
Reference in New Issue