[coverity] 1543043 Dereference null return value

This commit is contained in:
akallabeth 2024-04-12 08:51:38 +02:00 committed by akallabeth
parent 7bf76ab67f
commit 9ced090cea
1 changed files with 3 additions and 0 deletions

View File

@ -1304,6 +1304,9 @@ static KRB_CONTEXT* get_context(PCtxtHandle phContext)
return NULL;
TCHAR* name = sspi_SecureHandleGetUpperPointer(phContext);
if (!name)
return NULL;
if (_tcscmp(KERBEROS_SSP_NAME, name) != 0)
return NULL;
return sspi_SecureHandleGetLowerPointer(phContext);